-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: remove unused proto imports (#777)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 468735472 Source-Link: googleapis/googleapis@cfa1b37 Source-Link: googleapis/googleapis-gen@09b7666 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDliNzY2NjY1NjUxMGY1YjAwYjg5M2YwMDNhMGJhNTc2NmY5ZTI1MCJ9
- Loading branch information
1 parent
b9aef38
commit a65bad0
Showing
154 changed files
with
7,019 additions
and
0 deletions.
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
...talabeling/v1beta1/datalabelingserviceclient/create/SyncCreateSetCredentialsProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* Copyright 2022 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.google.cloud.datalabeling.v1beta1.samples; | ||
|
||
// [START datalabeling_v1beta1_generated_datalabelingserviceclient_create_setcredentialsprovider_sync] | ||
import com.google.api.gax.core.FixedCredentialsProvider; | ||
import com.google.cloud.datalabeling.v1beta1.DataLabelingServiceClient; | ||
import com.google.cloud.datalabeling.v1beta1.DataLabelingServiceSettings; | ||
import com.google.cloud.datalabeling.v1beta1.myCredentials; | ||
|
||
public class SyncCreateSetCredentialsProvider { | ||
|
||
public static void main(String[] args) throws Exception { | ||
syncCreateSetCredentialsProvider(); | ||
} | ||
|
||
public static void syncCreateSetCredentialsProvider() throws Exception { | ||
// This snippet has been automatically generated for illustrative purposes only. | ||
// It may require modifications to work in your environment. | ||
DataLabelingServiceSettings dataLabelingServiceSettings = | ||
DataLabelingServiceSettings.newBuilder() | ||
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) | ||
.build(); | ||
DataLabelingServiceClient dataLabelingServiceClient = | ||
DataLabelingServiceClient.create(dataLabelingServiceSettings); | ||
} | ||
} | ||
// [END datalabeling_v1beta1_generated_datalabelingserviceclient_create_setcredentialsprovider_sync] |
39 changes: 39 additions & 0 deletions
39
...le/cloud/datalabeling/v1beta1/datalabelingserviceclient/create/SyncCreateSetEndpoint.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* Copyright 2022 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.google.cloud.datalabeling.v1beta1.samples; | ||
|
||
// [START datalabeling_v1beta1_generated_datalabelingserviceclient_create_setendpoint_sync] | ||
import com.google.cloud.datalabeling.v1beta1.DataLabelingServiceClient; | ||
import com.google.cloud.datalabeling.v1beta1.DataLabelingServiceSettings; | ||
import com.google.cloud.datalabeling.v1beta1.myEndpoint; | ||
|
||
public class SyncCreateSetEndpoint { | ||
|
||
public static void main(String[] args) throws Exception { | ||
syncCreateSetEndpoint(); | ||
} | ||
|
||
public static void syncCreateSetEndpoint() throws Exception { | ||
// This snippet has been automatically generated for illustrative purposes only. | ||
// It may require modifications to work in your environment. | ||
DataLabelingServiceSettings dataLabelingServiceSettings = | ||
DataLabelingServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); | ||
DataLabelingServiceClient dataLabelingServiceClient = | ||
DataLabelingServiceClient.create(dataLabelingServiceSettings); | ||
} | ||
} | ||
// [END datalabeling_v1beta1_generated_datalabelingserviceclient_create_setendpoint_sync] |
48 changes: 48 additions & 0 deletions
48
...beta1/datalabelingserviceclient/createannotationspecset/AsyncCreateAnnotationSpecSet.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* | ||
* Copyright 2022 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.google.cloud.datalabeling.v1beta1.samples; | ||
|
||
// [START datalabeling_v1beta1_generated_datalabelingserviceclient_createannotationspecset_async] | ||
import com.google.api.core.ApiFuture; | ||
import com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet; | ||
import com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest; | ||
import com.google.cloud.datalabeling.v1beta1.DataLabelingServiceClient; | ||
import com.google.cloud.datalabeling.v1beta1.ProjectName; | ||
|
||
public class AsyncCreateAnnotationSpecSet { | ||
|
||
public static void main(String[] args) throws Exception { | ||
asyncCreateAnnotationSpecSet(); | ||
} | ||
|
||
public static void asyncCreateAnnotationSpecSet() throws Exception { | ||
// This snippet has been automatically generated for illustrative purposes only. | ||
// It may require modifications to work in your environment. | ||
try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) { | ||
CreateAnnotationSpecSetRequest request = | ||
CreateAnnotationSpecSetRequest.newBuilder() | ||
.setParent(ProjectName.of("[PROJECT]").toString()) | ||
.setAnnotationSpecSet(AnnotationSpecSet.newBuilder().build()) | ||
.build(); | ||
ApiFuture<AnnotationSpecSet> future = | ||
dataLabelingServiceClient.createAnnotationSpecSetCallable().futureCall(request); | ||
// Do something. | ||
AnnotationSpecSet response = future.get(); | ||
} | ||
} | ||
} | ||
// [END datalabeling_v1beta1_generated_datalabelingserviceclient_createannotationspecset_async] |
44 changes: 44 additions & 0 deletions
44
...1beta1/datalabelingserviceclient/createannotationspecset/SyncCreateAnnotationSpecSet.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* Copyright 2022 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.google.cloud.datalabeling.v1beta1.samples; | ||
|
||
// [START datalabeling_v1beta1_generated_datalabelingserviceclient_createannotationspecset_sync] | ||
import com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet; | ||
import com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest; | ||
import com.google.cloud.datalabeling.v1beta1.DataLabelingServiceClient; | ||
import com.google.cloud.datalabeling.v1beta1.ProjectName; | ||
|
||
public class SyncCreateAnnotationSpecSet { | ||
|
||
public static void main(String[] args) throws Exception { | ||
syncCreateAnnotationSpecSet(); | ||
} | ||
|
||
public static void syncCreateAnnotationSpecSet() throws Exception { | ||
// This snippet has been automatically generated for illustrative purposes only. | ||
// It may require modifications to work in your environment. | ||
try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) { | ||
CreateAnnotationSpecSetRequest request = | ||
CreateAnnotationSpecSetRequest.newBuilder() | ||
.setParent(ProjectName.of("[PROJECT]").toString()) | ||
.setAnnotationSpecSet(AnnotationSpecSet.newBuilder().build()) | ||
.build(); | ||
AnnotationSpecSet response = dataLabelingServiceClient.createAnnotationSpecSet(request); | ||
} | ||
} | ||
} | ||
// [END datalabeling_v1beta1_generated_datalabelingserviceclient_createannotationspecset_sync] |
41 changes: 41 additions & 0 deletions
41
...ient/createannotationspecset/SyncCreateAnnotationSpecSetProjectnameAnnotationspecset.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* Copyright 2022 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.google.cloud.datalabeling.v1beta1.samples; | ||
|
||
// [START datalabeling_v1beta1_generated_datalabelingserviceclient_createannotationspecset_projectnameannotationspecset_sync] | ||
import com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet; | ||
import com.google.cloud.datalabeling.v1beta1.DataLabelingServiceClient; | ||
import com.google.cloud.datalabeling.v1beta1.ProjectName; | ||
|
||
public class SyncCreateAnnotationSpecSetProjectnameAnnotationspecset { | ||
|
||
public static void main(String[] args) throws Exception { | ||
syncCreateAnnotationSpecSetProjectnameAnnotationspecset(); | ||
} | ||
|
||
public static void syncCreateAnnotationSpecSetProjectnameAnnotationspecset() throws Exception { | ||
// This snippet has been automatically generated for illustrative purposes only. | ||
// It may require modifications to work in your environment. | ||
try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) { | ||
ProjectName parent = ProjectName.of("[PROJECT]"); | ||
AnnotationSpecSet annotationSpecSet = AnnotationSpecSet.newBuilder().build(); | ||
AnnotationSpecSet response = | ||
dataLabelingServiceClient.createAnnotationSpecSet(parent, annotationSpecSet); | ||
} | ||
} | ||
} | ||
// [END datalabeling_v1beta1_generated_datalabelingserviceclient_createannotationspecset_projectnameannotationspecset_sync] |
41 changes: 41 additions & 0 deletions
41
...iceclient/createannotationspecset/SyncCreateAnnotationSpecSetStringAnnotationspecset.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* Copyright 2022 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.google.cloud.datalabeling.v1beta1.samples; | ||
|
||
// [START datalabeling_v1beta1_generated_datalabelingserviceclient_createannotationspecset_stringannotationspecset_sync] | ||
import com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet; | ||
import com.google.cloud.datalabeling.v1beta1.DataLabelingServiceClient; | ||
import com.google.cloud.datalabeling.v1beta1.ProjectName; | ||
|
||
public class SyncCreateAnnotationSpecSetStringAnnotationspecset { | ||
|
||
public static void main(String[] args) throws Exception { | ||
syncCreateAnnotationSpecSetStringAnnotationspecset(); | ||
} | ||
|
||
public static void syncCreateAnnotationSpecSetStringAnnotationspecset() throws Exception { | ||
// This snippet has been automatically generated for illustrative purposes only. | ||
// It may require modifications to work in your environment. | ||
try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) { | ||
String parent = ProjectName.of("[PROJECT]").toString(); | ||
AnnotationSpecSet annotationSpecSet = AnnotationSpecSet.newBuilder().build(); | ||
AnnotationSpecSet response = | ||
dataLabelingServiceClient.createAnnotationSpecSet(parent, annotationSpecSet); | ||
} | ||
} | ||
} | ||
// [END datalabeling_v1beta1_generated_datalabelingserviceclient_createannotationspecset_stringannotationspecset_sync] |
48 changes: 48 additions & 0 deletions
48
...loud/datalabeling/v1beta1/datalabelingserviceclient/createdataset/AsyncCreateDataset.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* | ||
* Copyright 2022 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.google.cloud.datalabeling.v1beta1.samples; | ||
|
||
// [START datalabeling_v1beta1_generated_datalabelingserviceclient_createdataset_async] | ||
import com.google.api.core.ApiFuture; | ||
import com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest; | ||
import com.google.cloud.datalabeling.v1beta1.DataLabelingServiceClient; | ||
import com.google.cloud.datalabeling.v1beta1.Dataset; | ||
import com.google.cloud.datalabeling.v1beta1.ProjectName; | ||
|
||
public class AsyncCreateDataset { | ||
|
||
public static void main(String[] args) throws Exception { | ||
asyncCreateDataset(); | ||
} | ||
|
||
public static void asyncCreateDataset() throws Exception { | ||
// This snippet has been automatically generated for illustrative purposes only. | ||
// It may require modifications to work in your environment. | ||
try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) { | ||
CreateDatasetRequest request = | ||
CreateDatasetRequest.newBuilder() | ||
.setParent(ProjectName.of("[PROJECT]").toString()) | ||
.setDataset(Dataset.newBuilder().build()) | ||
.build(); | ||
ApiFuture<Dataset> future = | ||
dataLabelingServiceClient.createDatasetCallable().futureCall(request); | ||
// Do something. | ||
Dataset response = future.get(); | ||
} | ||
} | ||
} | ||
// [END datalabeling_v1beta1_generated_datalabelingserviceclient_createdataset_async] |
44 changes: 44 additions & 0 deletions
44
...cloud/datalabeling/v1beta1/datalabelingserviceclient/createdataset/SyncCreateDataset.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* Copyright 2022 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.google.cloud.datalabeling.v1beta1.samples; | ||
|
||
// [START datalabeling_v1beta1_generated_datalabelingserviceclient_createdataset_sync] | ||
import com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest; | ||
import com.google.cloud.datalabeling.v1beta1.DataLabelingServiceClient; | ||
import com.google.cloud.datalabeling.v1beta1.Dataset; | ||
import com.google.cloud.datalabeling.v1beta1.ProjectName; | ||
|
||
public class SyncCreateDataset { | ||
|
||
public static void main(String[] args) throws Exception { | ||
syncCreateDataset(); | ||
} | ||
|
||
public static void syncCreateDataset() throws Exception { | ||
// This snippet has been automatically generated for illustrative purposes only. | ||
// It may require modifications to work in your environment. | ||
try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) { | ||
CreateDatasetRequest request = | ||
CreateDatasetRequest.newBuilder() | ||
.setParent(ProjectName.of("[PROJECT]").toString()) | ||
.setDataset(Dataset.newBuilder().build()) | ||
.build(); | ||
Dataset response = dataLabelingServiceClient.createDataset(request); | ||
} | ||
} | ||
} | ||
// [END datalabeling_v1beta1_generated_datalabelingserviceclient_createdataset_sync] |
40 changes: 40 additions & 0 deletions
40
.../v1beta1/datalabelingserviceclient/createdataset/SyncCreateDatasetProjectnameDataset.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
* Copyright 2022 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.google.cloud.datalabeling.v1beta1.samples; | ||
|
||
// [START datalabeling_v1beta1_generated_datalabelingserviceclient_createdataset_projectnamedataset_sync] | ||
import com.google.cloud.datalabeling.v1beta1.DataLabelingServiceClient; | ||
import com.google.cloud.datalabeling.v1beta1.Dataset; | ||
import com.google.cloud.datalabeling.v1beta1.ProjectName; | ||
|
||
public class SyncCreateDatasetProjectnameDataset { | ||
|
||
public static void main(String[] args) throws Exception { | ||
syncCreateDatasetProjectnameDataset(); | ||
} | ||
|
||
public static void syncCreateDatasetProjectnameDataset() throws Exception { | ||
// This snippet has been automatically generated for illustrative purposes only. | ||
// It may require modifications to work in your environment. | ||
try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) { | ||
ProjectName parent = ProjectName.of("[PROJECT]"); | ||
Dataset dataset = Dataset.newBuilder().build(); | ||
Dataset response = dataLabelingServiceClient.createDataset(parent, dataset); | ||
} | ||
} | ||
} | ||
// [END datalabeling_v1beta1_generated_datalabelingserviceclient_createdataset_projectnamedataset_sync] |
Oops, something went wrong.