Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [batch] onboard Resource Allowance API methods on v1alpha #10624

Closed
wants to merge 4 commits into from
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 @@ -18,6 +18,7 @@

import static com.google.cloud.batch.v1alpha.BatchServiceClient.ListJobsPagedResponse;
import static com.google.cloud.batch.v1alpha.BatchServiceClient.ListLocationsPagedResponse;
import static com.google.cloud.batch.v1alpha.BatchServiceClient.ListResourceAllowancesPagedResponse;
import static com.google.cloud.batch.v1alpha.BatchServiceClient.ListTasksPagedResponse;

import com.google.api.core.ApiFunction;
Expand Down Expand Up @@ -122,6 +123,46 @@ public UnaryCallSettings<GetTaskRequest, Task> getTaskSettings() {
return ((BatchServiceStubSettings) getStubSettings()).listTasksSettings();
}

/** Returns the object with the settings used for calls to createResourceAllowance. */
public UnaryCallSettings<CreateResourceAllowanceRequest, ResourceAllowance>
createResourceAllowanceSettings() {
return ((BatchServiceStubSettings) getStubSettings()).createResourceAllowanceSettings();
}

/** Returns the object with the settings used for calls to getResourceAllowance. */
public UnaryCallSettings<GetResourceAllowanceRequest, ResourceAllowance>
getResourceAllowanceSettings() {
return ((BatchServiceStubSettings) getStubSettings()).getResourceAllowanceSettings();
}

/** Returns the object with the settings used for calls to deleteResourceAllowance. */
public UnaryCallSettings<DeleteResourceAllowanceRequest, Operation>
deleteResourceAllowanceSettings() {
return ((BatchServiceStubSettings) getStubSettings()).deleteResourceAllowanceSettings();
}

/** Returns the object with the settings used for calls to deleteResourceAllowance. */
public OperationCallSettings<DeleteResourceAllowanceRequest, Empty, OperationMetadata>
deleteResourceAllowanceOperationSettings() {
return ((BatchServiceStubSettings) getStubSettings())
.deleteResourceAllowanceOperationSettings();
}

/** Returns the object with the settings used for calls to listResourceAllowances. */
public PagedCallSettings<
ListResourceAllowancesRequest,
ListResourceAllowancesResponse,
ListResourceAllowancesPagedResponse>
listResourceAllowancesSettings() {
return ((BatchServiceStubSettings) getStubSettings()).listResourceAllowancesSettings();
}

/** Returns the object with the settings used for calls to updateResourceAllowance. */
public UnaryCallSettings<UpdateResourceAllowanceRequest, ResourceAllowance>
updateResourceAllowanceSettings() {
return ((BatchServiceStubSettings) getStubSettings()).updateResourceAllowanceSettings();
}

/** Returns the object with the settings used for calls to listLocations. */
public PagedCallSettings<ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
listLocationsSettings() {
Expand Down Expand Up @@ -283,6 +324,45 @@ public UnaryCallSettings.Builder<GetTaskRequest, Task> getTaskSettings() {
return getStubSettingsBuilder().listTasksSettings();
}

/** Returns the builder for the settings used for calls to createResourceAllowance. */
public UnaryCallSettings.Builder<CreateResourceAllowanceRequest, ResourceAllowance>
createResourceAllowanceSettings() {
return getStubSettingsBuilder().createResourceAllowanceSettings();
}

/** Returns the builder for the settings used for calls to getResourceAllowance. */
public UnaryCallSettings.Builder<GetResourceAllowanceRequest, ResourceAllowance>
getResourceAllowanceSettings() {
return getStubSettingsBuilder().getResourceAllowanceSettings();
}

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

/** Returns the builder for the settings used for calls to deleteResourceAllowance. */
public OperationCallSettings.Builder<DeleteResourceAllowanceRequest, Empty, OperationMetadata>
deleteResourceAllowanceOperationSettings() {
return getStubSettingsBuilder().deleteResourceAllowanceOperationSettings();
}

/** Returns the builder for the settings used for calls to listResourceAllowances. */
public PagedCallSettings.Builder<
ListResourceAllowancesRequest,
ListResourceAllowancesResponse,
ListResourceAllowancesPagedResponse>
listResourceAllowancesSettings() {
return getStubSettingsBuilder().listResourceAllowancesSettings();
}

/** Returns the builder for the settings used for calls to updateResourceAllowance. */
public UnaryCallSettings.Builder<UpdateResourceAllowanceRequest, ResourceAllowance>
updateResourceAllowanceSettings() {
return getStubSettingsBuilder().updateResourceAllowanceSettings();
}

/** Returns the builder for the settings used for calls to listLocations. */
public PagedCallSettings.Builder<
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,24 @@
"CreateJob": {
"methods": ["createJob", "createJob", "createJob", "createJobCallable"]
},
"CreateResourceAllowance": {
"methods": ["createResourceAllowance", "createResourceAllowance", "createResourceAllowance", "createResourceAllowanceCallable"]
},
"DeleteJob": {
"methods": ["deleteJobAsync", "deleteJobAsync", "deleteJobOperationCallable", "deleteJobCallable"]
},
"DeleteResourceAllowance": {
"methods": ["deleteResourceAllowanceAsync", "deleteResourceAllowanceAsync", "deleteResourceAllowanceAsync", "deleteResourceAllowanceOperationCallable", "deleteResourceAllowanceCallable"]
},
"GetJob": {
"methods": ["getJob", "getJob", "getJob", "getJobCallable"]
},
"GetLocation": {
"methods": ["getLocation", "getLocationCallable"]
},
"GetResourceAllowance": {
"methods": ["getResourceAllowance", "getResourceAllowance", "getResourceAllowance", "getResourceAllowanceCallable"]
},
"GetTask": {
"methods": ["getTask", "getTask", "getTask", "getTaskCallable"]
},
Expand All @@ -31,8 +40,14 @@
"ListLocations": {
"methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"]
},
"ListResourceAllowances": {
"methods": ["listResourceAllowances", "listResourceAllowances", "listResourceAllowances", "listResourceAllowancesPagedCallable", "listResourceAllowancesCallable"]
},
"ListTasks": {
"methods": ["listTasks", "listTasks", "listTasks", "listTasksPagedCallable", "listTasksCallable"]
},
"UpdateResourceAllowance": {
"methods": ["updateResourceAllowance", "updateResourceAllowance", "updateResourceAllowanceCallable"]
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,31 @@

import static com.google.cloud.batch.v1alpha.BatchServiceClient.ListJobsPagedResponse;
import static com.google.cloud.batch.v1alpha.BatchServiceClient.ListLocationsPagedResponse;
import static com.google.cloud.batch.v1alpha.BatchServiceClient.ListResourceAllowancesPagedResponse;
import static com.google.cloud.batch.v1alpha.BatchServiceClient.ListTasksPagedResponse;

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;
import com.google.cloud.batch.v1alpha.CreateJobRequest;
import com.google.cloud.batch.v1alpha.CreateResourceAllowanceRequest;
import com.google.cloud.batch.v1alpha.DeleteJobRequest;
import com.google.cloud.batch.v1alpha.DeleteResourceAllowanceRequest;
import com.google.cloud.batch.v1alpha.GetJobRequest;
import com.google.cloud.batch.v1alpha.GetResourceAllowanceRequest;
import com.google.cloud.batch.v1alpha.GetTaskRequest;
import com.google.cloud.batch.v1alpha.Job;
import com.google.cloud.batch.v1alpha.ListJobsRequest;
import com.google.cloud.batch.v1alpha.ListJobsResponse;
import com.google.cloud.batch.v1alpha.ListResourceAllowancesRequest;
import com.google.cloud.batch.v1alpha.ListResourceAllowancesResponse;
import com.google.cloud.batch.v1alpha.ListTasksRequest;
import com.google.cloud.batch.v1alpha.ListTasksResponse;
import com.google.cloud.batch.v1alpha.OperationMetadata;
import com.google.cloud.batch.v1alpha.ResourceAllowance;
import com.google.cloud.batch.v1alpha.Task;
import com.google.cloud.batch.v1alpha.UpdateResourceAllowanceRequest;
import com.google.cloud.location.GetLocationRequest;
import com.google.cloud.location.ListLocationsRequest;
import com.google.cloud.location.ListLocationsResponse;
Expand Down Expand Up @@ -99,6 +107,43 @@ public UnaryCallable<ListTasksRequest, ListTasksResponse> listTasksCallable() {
throw new UnsupportedOperationException("Not implemented: listTasksCallable()");
}

public UnaryCallable<CreateResourceAllowanceRequest, ResourceAllowance>
createResourceAllowanceCallable() {
throw new UnsupportedOperationException("Not implemented: createResourceAllowanceCallable()");
}

public UnaryCallable<GetResourceAllowanceRequest, ResourceAllowance>
getResourceAllowanceCallable() {
throw new UnsupportedOperationException("Not implemented: getResourceAllowanceCallable()");
}

public OperationCallable<DeleteResourceAllowanceRequest, Empty, OperationMetadata>
deleteResourceAllowanceOperationCallable() {
throw new UnsupportedOperationException(
"Not implemented: deleteResourceAllowanceOperationCallable()");
}

public UnaryCallable<DeleteResourceAllowanceRequest, Operation>
deleteResourceAllowanceCallable() {
throw new UnsupportedOperationException("Not implemented: deleteResourceAllowanceCallable()");
}

public UnaryCallable<ListResourceAllowancesRequest, ListResourceAllowancesPagedResponse>
listResourceAllowancesPagedCallable() {
throw new UnsupportedOperationException(
"Not implemented: listResourceAllowancesPagedCallable()");
}

public UnaryCallable<ListResourceAllowancesRequest, ListResourceAllowancesResponse>
listResourceAllowancesCallable() {
throw new UnsupportedOperationException("Not implemented: listResourceAllowancesCallable()");
}

public UnaryCallable<UpdateResourceAllowanceRequest, ResourceAllowance>
updateResourceAllowanceCallable() {
throw new UnsupportedOperationException("Not implemented: updateResourceAllowanceCallable()");
}

public UnaryCallable<ListLocationsRequest, ListLocationsPagedResponse>
listLocationsPagedCallable() {
throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()");
Expand Down
Loading