Skip to content
This repository was archived by the owner on Sep 16, 2023. It is now read-only.

Commit eb227fe

Browse files
feat: add APIs for importing and uploading Apt and Yum artifacts (#213)
- [ ] Regenerate this pull request now. feat: add version policy support for Maven repositories feat: add order_by support for listing versions fix!: mark a few resource name fields as required PiperOrigin-RevId: 423145765 Source-Link: googleapis/googleapis@76ff1e5 Source-Link: https://github.com/googleapis/googleapis-gen/commit/b3460312e025b287708d59ba73a72d806d01d221 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjM0NjAzMTJlMDI1YjI4NzcwOGQ1OWJhNzNhNzJkODA2ZDAxZDIyMSJ9
1 parent 32e31af commit eb227fe

File tree

82 files changed

+23676
-558
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+23676
-558
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file:
1919
<dependency>
2020
<groupId>com.google.cloud</groupId>
2121
<artifactId>google-cloud-artifact-registry</artifactId>
22-
<version>0.5.0</version>
22+
<version>1.0.0</version>
2323
</dependency>
2424
```
2525

2626
If you are using Gradle without BOM, add this to your dependencies
2727

2828
```Groovy
29-
implementation 'com.google.cloud:google-cloud-artifact-registry:0.5.0'
29+
implementation 'com.google.cloud:google-cloud-artifact-registry:1.0.0'
3030
```
3131

3232
If you are using SBT, add this to your dependencies
3333

3434
```Scala
35-
libraryDependencies += "com.google.cloud" % "google-cloud-artifact-registry" % "0.5.0"
35+
libraryDependencies += "com.google.cloud" % "google-cloud-artifact-registry" % "1.0.0"
3636
```
3737

3838
## Authentication

google-cloud-artifact-registry/src/main/java/com/google/devtools/artifactregistry/v1beta2/ArtifactRegistryClient.java

Lines changed: 462 additions & 26 deletions
Large diffs are not rendered by default.

google-cloud-artifact-registry/src/main/java/com/google/devtools/artifactregistry/v1beta2/ArtifactRegistrySettings.java

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,30 @@
8383
@Generated("by gapic-generator-java")
8484
public class ArtifactRegistrySettings extends ClientSettings<ArtifactRegistrySettings> {
8585

86+
/** Returns the object with the settings used for calls to importAptArtifacts. */
87+
public UnaryCallSettings<ImportAptArtifactsRequest, Operation> importAptArtifactsSettings() {
88+
return ((ArtifactRegistryStubSettings) getStubSettings()).importAptArtifactsSettings();
89+
}
90+
91+
/** Returns the object with the settings used for calls to importAptArtifacts. */
92+
public OperationCallSettings<
93+
ImportAptArtifactsRequest, ImportAptArtifactsResponse, ImportAptArtifactsMetadata>
94+
importAptArtifactsOperationSettings() {
95+
return ((ArtifactRegistryStubSettings) getStubSettings()).importAptArtifactsOperationSettings();
96+
}
97+
98+
/** Returns the object with the settings used for calls to importYumArtifacts. */
99+
public UnaryCallSettings<ImportYumArtifactsRequest, Operation> importYumArtifactsSettings() {
100+
return ((ArtifactRegistryStubSettings) getStubSettings()).importYumArtifactsSettings();
101+
}
102+
103+
/** Returns the object with the settings used for calls to importYumArtifacts. */
104+
public OperationCallSettings<
105+
ImportYumArtifactsRequest, ImportYumArtifactsResponse, ImportYumArtifactsMetadata>
106+
importYumArtifactsOperationSettings() {
107+
return ((ArtifactRegistryStubSettings) getStubSettings()).importYumArtifactsOperationSettings();
108+
}
109+
86110
/** Returns the object with the settings used for calls to listRepositories. */
87111
public PagedCallSettings<
88112
ListRepositoriesRequest, ListRepositoriesResponse, ListRepositoriesPagedResponse>
@@ -219,6 +243,18 @@ public UnaryCallSettings<GetIamPolicyRequest, Policy> getIamPolicySettings() {
219243
return ((ArtifactRegistryStubSettings) getStubSettings()).testIamPermissionsSettings();
220244
}
221245

246+
/** Returns the object with the settings used for calls to getProjectSettings. */
247+
public UnaryCallSettings<GetProjectSettingsRequest, ProjectSettings>
248+
getProjectSettingsSettings() {
249+
return ((ArtifactRegistryStubSettings) getStubSettings()).getProjectSettingsSettings();
250+
}
251+
252+
/** Returns the object with the settings used for calls to updateProjectSettings. */
253+
public UnaryCallSettings<UpdateProjectSettingsRequest, ProjectSettings>
254+
updateProjectSettingsSettings() {
255+
return ((ArtifactRegistryStubSettings) getStubSettings()).updateProjectSettingsSettings();
256+
}
257+
222258
public static final ArtifactRegistrySettings create(ArtifactRegistryStubSettings stub)
223259
throws IOException {
224260
return new ArtifactRegistrySettings.Builder(stub.toBuilder()).build();
@@ -316,6 +352,32 @@ public Builder applyToAllUnaryMethods(
316352
return this;
317353
}
318354

355+
/** Returns the builder for the settings used for calls to importAptArtifacts. */
356+
public UnaryCallSettings.Builder<ImportAptArtifactsRequest, Operation>
357+
importAptArtifactsSettings() {
358+
return getStubSettingsBuilder().importAptArtifactsSettings();
359+
}
360+
361+
/** Returns the builder for the settings used for calls to importAptArtifacts. */
362+
public OperationCallSettings.Builder<
363+
ImportAptArtifactsRequest, ImportAptArtifactsResponse, ImportAptArtifactsMetadata>
364+
importAptArtifactsOperationSettings() {
365+
return getStubSettingsBuilder().importAptArtifactsOperationSettings();
366+
}
367+
368+
/** Returns the builder for the settings used for calls to importYumArtifacts. */
369+
public UnaryCallSettings.Builder<ImportYumArtifactsRequest, Operation>
370+
importYumArtifactsSettings() {
371+
return getStubSettingsBuilder().importYumArtifactsSettings();
372+
}
373+
374+
/** Returns the builder for the settings used for calls to importYumArtifacts. */
375+
public OperationCallSettings.Builder<
376+
ImportYumArtifactsRequest, ImportYumArtifactsResponse, ImportYumArtifactsMetadata>
377+
importYumArtifactsOperationSettings() {
378+
return getStubSettingsBuilder().importYumArtifactsOperationSettings();
379+
}
380+
319381
/** Returns the builder for the settings used for calls to listRepositories. */
320382
public PagedCallSettings.Builder<
321383
ListRepositoriesRequest, ListRepositoriesResponse, ListRepositoriesPagedResponse>
@@ -457,6 +519,18 @@ public UnaryCallSettings.Builder<GetIamPolicyRequest, Policy> getIamPolicySettin
457519
return getStubSettingsBuilder().testIamPermissionsSettings();
458520
}
459521

522+
/** Returns the builder for the settings used for calls to getProjectSettings. */
523+
public UnaryCallSettings.Builder<GetProjectSettingsRequest, ProjectSettings>
524+
getProjectSettingsSettings() {
525+
return getStubSettingsBuilder().getProjectSettingsSettings();
526+
}
527+
528+
/** Returns the builder for the settings used for calls to updateProjectSettings. */
529+
public UnaryCallSettings.Builder<UpdateProjectSettingsRequest, ProjectSettings>
530+
updateProjectSettingsSettings() {
531+
return getStubSettingsBuilder().updateProjectSettingsSettings();
532+
}
533+
460534
@Override
461535
public ArtifactRegistrySettings build() throws IOException {
462536
return new ArtifactRegistrySettings(this);

google-cloud-artifact-registry/src/main/java/com/google/devtools/artifactregistry/v1beta2/gapic_metadata.json

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"libraryClient": "ArtifactRegistryClient",
1212
"rpcs": {
1313
"CreateRepository": {
14-
"methods": ["createRepositoryAsync", "createRepositoryAsync", "createRepositoryOperationCallable", "createRepositoryCallable"]
14+
"methods": ["createRepositoryAsync", "createRepositoryAsync", "createRepositoryAsync", "createRepositoryOperationCallable", "createRepositoryCallable"]
1515
},
1616
"CreateTag": {
1717
"methods": ["createTag", "createTag", "createTagCallable"]
@@ -20,7 +20,7 @@
2020
"methods": ["deletePackageAsync", "deletePackageAsync", "deletePackageOperationCallable", "deletePackageCallable"]
2121
},
2222
"DeleteRepository": {
23-
"methods": ["deleteRepositoryAsync", "deleteRepositoryAsync", "deleteRepositoryOperationCallable", "deleteRepositoryCallable"]
23+
"methods": ["deleteRepositoryAsync", "deleteRepositoryAsync", "deleteRepositoryAsync", "deleteRepositoryOperationCallable", "deleteRepositoryCallable"]
2424
},
2525
"DeleteTag": {
2626
"methods": ["deleteTag", "deleteTag", "deleteTagCallable"]
@@ -37,23 +37,32 @@
3737
"GetPackage": {
3838
"methods": ["getPackage", "getPackage", "getPackageCallable"]
3939
},
40+
"GetProjectSettings": {
41+
"methods": ["getProjectSettings", "getProjectSettings", "getProjectSettings", "getProjectSettingsCallable"]
42+
},
4043
"GetRepository": {
41-
"methods": ["getRepository", "getRepository", "getRepositoryCallable"]
44+
"methods": ["getRepository", "getRepository", "getRepository", "getRepositoryCallable"]
4245
},
4346
"GetTag": {
4447
"methods": ["getTag", "getTag", "getTagCallable"]
4548
},
4649
"GetVersion": {
4750
"methods": ["getVersion", "getVersion", "getVersionCallable"]
4851
},
52+
"ImportAptArtifacts": {
53+
"methods": ["importAptArtifactsAsync", "importAptArtifactsOperationCallable", "importAptArtifactsCallable"]
54+
},
55+
"ImportYumArtifacts": {
56+
"methods": ["importYumArtifactsAsync", "importYumArtifactsOperationCallable", "importYumArtifactsCallable"]
57+
},
4958
"ListFiles": {
5059
"methods": ["listFiles", "listFiles", "listFilesPagedCallable", "listFilesCallable"]
5160
},
5261
"ListPackages": {
5362
"methods": ["listPackages", "listPackages", "listPackagesPagedCallable", "listPackagesCallable"]
5463
},
5564
"ListRepositories": {
56-
"methods": ["listRepositories", "listRepositories", "listRepositoriesPagedCallable", "listRepositoriesCallable"]
65+
"methods": ["listRepositories", "listRepositories", "listRepositories", "listRepositoriesPagedCallable", "listRepositoriesCallable"]
5766
},
5867
"ListTags": {
5968
"methods": ["listTags", "listTags", "listTagsPagedCallable", "listTagsCallable"]
@@ -67,6 +76,9 @@
6776
"TestIamPermissions": {
6877
"methods": ["testIamPermissions", "testIamPermissionsCallable"]
6978
},
79+
"UpdateProjectSettings": {
80+
"methods": ["updateProjectSettings", "updateProjectSettings", "updateProjectSettingsCallable"]
81+
},
7082
"UpdateRepository": {
7183
"methods": ["updateRepository", "updateRepository", "updateRepositoryCallable"]
7284
},

google-cloud-artifact-registry/src/main/java/com/google/devtools/artifactregistry/v1beta2/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
*
3939
* <pre>{@code
4040
* try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
41-
* String name = "name3373707";
41+
* RepositoryName name = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]");
4242
* Repository response = artifactRegistryClient.getRepository(name);
4343
* }
4444
* }</pre>

google-cloud-artifact-registry/src/main/java/com/google/devtools/artifactregistry/v1beta2/stub/ArtifactRegistryStub.java

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,16 @@
3535
import com.google.devtools.artifactregistry.v1beta2.File;
3636
import com.google.devtools.artifactregistry.v1beta2.GetFileRequest;
3737
import com.google.devtools.artifactregistry.v1beta2.GetPackageRequest;
38+
import com.google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest;
3839
import com.google.devtools.artifactregistry.v1beta2.GetRepositoryRequest;
3940
import com.google.devtools.artifactregistry.v1beta2.GetTagRequest;
4041
import com.google.devtools.artifactregistry.v1beta2.GetVersionRequest;
42+
import com.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata;
43+
import com.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest;
44+
import com.google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse;
45+
import com.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata;
46+
import com.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest;
47+
import com.google.devtools.artifactregistry.v1beta2.ImportYumArtifactsResponse;
4148
import com.google.devtools.artifactregistry.v1beta2.ListFilesRequest;
4249
import com.google.devtools.artifactregistry.v1beta2.ListFilesResponse;
4350
import com.google.devtools.artifactregistry.v1beta2.ListPackagesRequest;
@@ -50,8 +57,10 @@
5057
import com.google.devtools.artifactregistry.v1beta2.ListVersionsResponse;
5158
import com.google.devtools.artifactregistry.v1beta2.OperationMetadata;
5259
import com.google.devtools.artifactregistry.v1beta2.Package;
60+
import com.google.devtools.artifactregistry.v1beta2.ProjectSettings;
5361
import com.google.devtools.artifactregistry.v1beta2.Repository;
5462
import com.google.devtools.artifactregistry.v1beta2.Tag;
63+
import com.google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest;
5564
import com.google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest;
5665
import com.google.devtools.artifactregistry.v1beta2.UpdateTagRequest;
5766
import com.google.devtools.artifactregistry.v1beta2.Version;
@@ -79,6 +88,28 @@ public OperationsStub getOperationsStub() {
7988
throw new UnsupportedOperationException("Not implemented: getOperationsStub()");
8089
}
8190

91+
public OperationCallable<
92+
ImportAptArtifactsRequest, ImportAptArtifactsResponse, ImportAptArtifactsMetadata>
93+
importAptArtifactsOperationCallable() {
94+
throw new UnsupportedOperationException(
95+
"Not implemented: importAptArtifactsOperationCallable()");
96+
}
97+
98+
public UnaryCallable<ImportAptArtifactsRequest, Operation> importAptArtifactsCallable() {
99+
throw new UnsupportedOperationException("Not implemented: importAptArtifactsCallable()");
100+
}
101+
102+
public OperationCallable<
103+
ImportYumArtifactsRequest, ImportYumArtifactsResponse, ImportYumArtifactsMetadata>
104+
importYumArtifactsOperationCallable() {
105+
throw new UnsupportedOperationException(
106+
"Not implemented: importYumArtifactsOperationCallable()");
107+
}
108+
109+
public UnaryCallable<ImportYumArtifactsRequest, Operation> importYumArtifactsCallable() {
110+
throw new UnsupportedOperationException("Not implemented: importYumArtifactsCallable()");
111+
}
112+
82113
public UnaryCallable<ListRepositoriesRequest, ListRepositoriesPagedResponse>
83114
listRepositoriesPagedCallable() {
84115
throw new UnsupportedOperationException("Not implemented: listRepositoriesPagedCallable()");
@@ -206,6 +237,15 @@ public UnaryCallable<GetIamPolicyRequest, Policy> getIamPolicyCallable() {
206237
throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()");
207238
}
208239

240+
public UnaryCallable<GetProjectSettingsRequest, ProjectSettings> getProjectSettingsCallable() {
241+
throw new UnsupportedOperationException("Not implemented: getProjectSettingsCallable()");
242+
}
243+
244+
public UnaryCallable<UpdateProjectSettingsRequest, ProjectSettings>
245+
updateProjectSettingsCallable() {
246+
throw new UnsupportedOperationException("Not implemented: updateProjectSettingsCallable()");
247+
}
248+
209249
@Override
210250
public abstract void close();
211251
}

0 commit comments

Comments
 (0)