Skip to content
This repository was archived by the owner on Sep 16, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
* 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
* 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.devtools.cloudbuild.v1;

import static com.google.cloud.devtools.cloudbuild.v1.CloudBuildClient.ListBuildTriggersPagedResponse;
Expand Down Expand Up @@ -60,7 +61,7 @@
import java.util.List;
import javax.annotation.Generated;

// AUTO-GENERATED DOCUMENTATION AND CLASS
// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
* Settings class to configure an instance of {@link CloudBuildClient}.
*
Expand All @@ -75,44 +76,31 @@
* <p>The builder of this class is recursive, so contained classes are themselves builders. When
* build() is called, the tree of builders is called to create the complete settings object.
*
* <p>For example, to set the total timeout of deleteBuildTrigger to 30 seconds:
* <p>For example, to set the total timeout of getBuild to 30 seconds:
*
* <pre>
* <code>
* CloudBuildSettings.Builder cloudBuildSettingsBuilder =
* CloudBuildSettings.newBuilder();
* <pre>{@code
* CloudBuildSettings.Builder cloudBuildSettingsBuilder = CloudBuildSettings.newBuilder();
* cloudBuildSettingsBuilder
* .deleteBuildTriggerSettings()
* .getBuildSettings()
* .setRetrySettings(
* cloudBuildSettingsBuilder.deleteBuildTriggerSettings().getRetrySettings().toBuilder()
* cloudBuildSettingsBuilder
* .getBuildSettings()
* .getRetrySettings()
* .toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* CloudBuildSettings cloudBuildSettings = cloudBuildSettingsBuilder.build();
* </code>
* </pre>
* }</pre>
*/
@Generated("by gapic-generator")
@BetaApi
@Generated("by gapic-generator-java")
public class CloudBuildSettings extends ClientSettings<CloudBuildSettings> {
/** Returns the object with the settings used for calls to listBuilds. */
public PagedCallSettings<ListBuildsRequest, ListBuildsResponse, ListBuildsPagedResponse>
listBuildsSettings() {
return ((CloudBuildStubSettings) getStubSettings()).listBuildsSettings();
}

/** Returns the object with the settings used for calls to deleteBuildTrigger. */
public UnaryCallSettings<DeleteBuildTriggerRequest, Empty> deleteBuildTriggerSettings() {
return ((CloudBuildStubSettings) getStubSettings()).deleteBuildTriggerSettings();
}

/** Returns the object with the settings used for calls to createBuild. */
public UnaryCallSettings<CreateBuildRequest, Operation> createBuildSettings() {
return ((CloudBuildStubSettings) getStubSettings()).createBuildSettings();
}

/** Returns the object with the settings used for calls to createBuild. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings<CreateBuildRequest, Build, BuildOperationMetadata>
createBuildOperationSettings() {
return ((CloudBuildStubSettings) getStubSettings()).createBuildOperationSettings();
Expand All @@ -123,6 +111,12 @@ public UnaryCallSettings<GetBuildRequest, Build> getBuildSettings() {
return ((CloudBuildStubSettings) getStubSettings()).getBuildSettings();
}

/** Returns the object with the settings used for calls to listBuilds. */
public PagedCallSettings<ListBuildsRequest, ListBuildsResponse, ListBuildsPagedResponse>
listBuildsSettings() {
return ((CloudBuildStubSettings) getStubSettings()).listBuildsSettings();
}

/** Returns the object with the settings used for calls to cancelBuild. */
public UnaryCallSettings<CancelBuildRequest, Build> cancelBuildSettings() {
return ((CloudBuildStubSettings) getStubSettings()).cancelBuildSettings();
Expand All @@ -134,8 +128,6 @@ public UnaryCallSettings<RetryBuildRequest, Operation> retryBuildSettings() {
}

/** Returns the object with the settings used for calls to retryBuild. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings<RetryBuildRequest, Build, BuildOperationMetadata>
retryBuildOperationSettings() {
return ((CloudBuildStubSettings) getStubSettings()).retryBuildOperationSettings();
Expand All @@ -158,6 +150,11 @@ public UnaryCallSettings<GetBuildTriggerRequest, BuildTrigger> getBuildTriggerSe
return ((CloudBuildStubSettings) getStubSettings()).listBuildTriggersSettings();
}

/** Returns the object with the settings used for calls to deleteBuildTrigger. */
public UnaryCallSettings<DeleteBuildTriggerRequest, Empty> deleteBuildTriggerSettings() {
return ((CloudBuildStubSettings) getStubSettings()).deleteBuildTriggerSettings();
}

/** Returns the object with the settings used for calls to updateBuildTrigger. */
public UnaryCallSettings<UpdateBuildTriggerRequest, BuildTrigger> updateBuildTriggerSettings() {
return ((CloudBuildStubSettings) getStubSettings()).updateBuildTriggerSettings();
Expand All @@ -169,8 +166,6 @@ public UnaryCallSettings<RunBuildTriggerRequest, Operation> runBuildTriggerSetti
}

/** Returns the object with the settings used for calls to runBuildTrigger. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings<RunBuildTriggerRequest, Build, BuildOperationMetadata>
runBuildTriggerOperationSettings() {
return ((CloudBuildStubSettings) getStubSettings()).runBuildTriggerOperationSettings();
Expand Down Expand Up @@ -261,18 +256,15 @@ protected CloudBuildSettings(Builder settingsBuilder) throws IOException {

/** Builder for CloudBuildSettings. */
public static class Builder extends ClientSettings.Builder<CloudBuildSettings, Builder> {

protected Builder() throws IOException {
this((ClientContext) null);
this(((ClientContext) null));
}

protected Builder(ClientContext clientContext) {
super(CloudBuildStubSettings.newBuilder(clientContext));
}

private static Builder createDefault() {
return new Builder(CloudBuildStubSettings.newBuilder());
}

protected Builder(CloudBuildSettings settings) {
super(settings.getStubSettings().toBuilder());
}
Expand All @@ -281,11 +273,15 @@ protected Builder(CloudBuildStubSettings.Builder stubSettings) {
super(stubSettings);
}

private static Builder createDefault() {
return new Builder(CloudBuildStubSettings.newBuilder());
}

public CloudBuildStubSettings.Builder getStubSettingsBuilder() {
return ((CloudBuildStubSettings.Builder) getStubSettings());
}

// NEXT_MAJOR_VER: remove 'throws Exception'
// NEXT_MAJOR_VER: remove 'throws Exception'.
/**
* Applies the given settings updater function to all of the unary API methods in this service.
*
Expand All @@ -298,26 +294,12 @@ public Builder applyToAllUnaryMethods(
return this;
}

/** Returns the builder for the settings used for calls to listBuilds. */
public PagedCallSettings.Builder<ListBuildsRequest, ListBuildsResponse, ListBuildsPagedResponse>
listBuildsSettings() {
return getStubSettingsBuilder().listBuildsSettings();
}

/** Returns the builder for the settings used for calls to deleteBuildTrigger. */
public UnaryCallSettings.Builder<DeleteBuildTriggerRequest, Empty>
deleteBuildTriggerSettings() {
return getStubSettingsBuilder().deleteBuildTriggerSettings();
}

/** Returns the builder for the settings used for calls to createBuild. */
public UnaryCallSettings.Builder<CreateBuildRequest, Operation> createBuildSettings() {
return getStubSettingsBuilder().createBuildSettings();
}

/** Returns the builder for the settings used for calls to createBuild. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings.Builder<CreateBuildRequest, Build, BuildOperationMetadata>
createBuildOperationSettings() {
return getStubSettingsBuilder().createBuildOperationSettings();
Expand All @@ -328,6 +310,12 @@ public UnaryCallSettings.Builder<GetBuildRequest, Build> getBuildSettings() {
return getStubSettingsBuilder().getBuildSettings();
}

/** Returns the builder for the settings used for calls to listBuilds. */
public PagedCallSettings.Builder<ListBuildsRequest, ListBuildsResponse, ListBuildsPagedResponse>
listBuildsSettings() {
return getStubSettingsBuilder().listBuildsSettings();
}

/** Returns the builder for the settings used for calls to cancelBuild. */
public UnaryCallSettings.Builder<CancelBuildRequest, Build> cancelBuildSettings() {
return getStubSettingsBuilder().cancelBuildSettings();
Expand All @@ -339,8 +327,6 @@ public UnaryCallSettings.Builder<RetryBuildRequest, Operation> retryBuildSetting
}

/** Returns the builder for the settings used for calls to retryBuild. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings.Builder<RetryBuildRequest, Build, BuildOperationMetadata>
retryBuildOperationSettings() {
return getStubSettingsBuilder().retryBuildOperationSettings();
Expand All @@ -365,6 +351,12 @@ public UnaryCallSettings.Builder<RetryBuildRequest, Operation> retryBuildSetting
return getStubSettingsBuilder().listBuildTriggersSettings();
}

/** Returns the builder for the settings used for calls to deleteBuildTrigger. */
public UnaryCallSettings.Builder<DeleteBuildTriggerRequest, Empty>
deleteBuildTriggerSettings() {
return getStubSettingsBuilder().deleteBuildTriggerSettings();
}

/** Returns the builder for the settings used for calls to updateBuildTrigger. */
public UnaryCallSettings.Builder<UpdateBuildTriggerRequest, BuildTrigger>
updateBuildTriggerSettings() {
Expand All @@ -377,8 +369,6 @@ public UnaryCallSettings.Builder<RunBuildTriggerRequest, Operation> runBuildTrig
}

/** Returns the builder for the settings used for calls to runBuildTrigger. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings.Builder<RunBuildTriggerRequest, Build, BuildOperationMetadata>
runBuildTriggerOperationSettings() {
return getStubSettingsBuilder().runBuildTriggerOperationSettings();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 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
* 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,
Expand All @@ -15,11 +15,9 @@
*/

/**
* A client to Cloud Build API.
* The interfaces provided are listed below, along with usage samples.
*
* <p>The interfaces provided are listed below, along with usage samples.
*
* <p>================ CloudBuildClient ================
* <p>======================= CloudBuildClient =======================
*
* <p>Service Description: Creates and manages builds on Google Cloud Platform.
*
Expand All @@ -30,18 +28,8 @@
* of the build.
*
* <p>Sample for CloudBuildClient:
*
* <pre>
* <code>
* try (CloudBuildClient cloudBuildClient = CloudBuildClient.create()) {
* String projectId = "";
* String triggerId = "";
* cloudBuildClient.deleteBuildTrigger(projectId, triggerId);
* }
* </code>
* </pre>
*/
@Generated("by gapic-generator")
@Generated("by gapic-generator-java")
package com.google.cloud.devtools.cloudbuild.v1;

import javax.annotation.Generated;
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
* 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
* 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.devtools.cloudbuild.v1.stub;

import static com.google.cloud.devtools.cloudbuild.v1.CloudBuildClient.ListBuildTriggersPagedResponse;
import static com.google.cloud.devtools.cloudbuild.v1.CloudBuildClient.ListBuildsPagedResponse;

import com.google.api.core.BetaApi;
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.rpc.OperationCallable;
import com.google.api.gax.rpc.UnaryCallable;
Expand Down Expand Up @@ -50,34 +50,19 @@
import com.google.protobuf.Empty;
import javax.annotation.Generated;

// AUTO-GENERATED DOCUMENTATION AND CLASS
// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
* Base stub class for Cloud Build API.
* Base stub class for the CloudBuild service API.
*
* <p>This class is for advanced usage and reflects the underlying API directly.
*/
@Generated("by gapic-generator")
@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public abstract class CloudBuildStub implements BackgroundResource {

@BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public OperationsStub getOperationsStub() {
throw new UnsupportedOperationException("Not implemented: getOperationsStub()");
}

public UnaryCallable<ListBuildsRequest, ListBuildsPagedResponse> listBuildsPagedCallable() {
throw new UnsupportedOperationException("Not implemented: listBuildsPagedCallable()");
}

public UnaryCallable<ListBuildsRequest, ListBuildsResponse> listBuildsCallable() {
throw new UnsupportedOperationException("Not implemented: listBuildsCallable()");
}

public UnaryCallable<DeleteBuildTriggerRequest, Empty> deleteBuildTriggerCallable() {
throw new UnsupportedOperationException("Not implemented: deleteBuildTriggerCallable()");
}

@BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public OperationCallable<CreateBuildRequest, Build, BuildOperationMetadata>
createBuildOperationCallable() {
throw new UnsupportedOperationException("Not implemented: createBuildOperationCallable()");
Expand All @@ -91,11 +76,18 @@ public UnaryCallable<GetBuildRequest, Build> getBuildCallable() {
throw new UnsupportedOperationException("Not implemented: getBuildCallable()");
}

public UnaryCallable<ListBuildsRequest, ListBuildsPagedResponse> listBuildsPagedCallable() {
throw new UnsupportedOperationException("Not implemented: listBuildsPagedCallable()");
}

public UnaryCallable<ListBuildsRequest, ListBuildsResponse> listBuildsCallable() {
throw new UnsupportedOperationException("Not implemented: listBuildsCallable()");
}

public UnaryCallable<CancelBuildRequest, Build> cancelBuildCallable() {
throw new UnsupportedOperationException("Not implemented: cancelBuildCallable()");
}

@BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public OperationCallable<RetryBuildRequest, Build, BuildOperationMetadata>
retryBuildOperationCallable() {
throw new UnsupportedOperationException("Not implemented: retryBuildOperationCallable()");
Expand Down Expand Up @@ -123,11 +115,14 @@ public UnaryCallable<GetBuildTriggerRequest, BuildTrigger> getBuildTriggerCallab
throw new UnsupportedOperationException("Not implemented: listBuildTriggersCallable()");
}

public UnaryCallable<DeleteBuildTriggerRequest, Empty> deleteBuildTriggerCallable() {
throw new UnsupportedOperationException("Not implemented: deleteBuildTriggerCallable()");
}

public UnaryCallable<UpdateBuildTriggerRequest, BuildTrigger> updateBuildTriggerCallable() {
throw new UnsupportedOperationException("Not implemented: updateBuildTriggerCallable()");
}

@BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public OperationCallable<RunBuildTriggerRequest, Build, BuildOperationMetadata>
runBuildTriggerOperationCallable() {
throw new UnsupportedOperationException("Not implemented: runBuildTriggerOperationCallable()");
Expand Down
Loading