Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -68,155 +68,156 @@
* as threads. In the example above, try-with-resources is used, which automatically calls close().
*
* <table>
* <caption>Methods</caption>
* <tr>
* <th>Method</th>
* <th>Description</th>
* <th>Method Variants</th>
* </tr>
* <tr>
* <td>CreateJob</td>
* <td><p> CreateJob</td>
* <td><p> Create a Job.</td>
* <td>
* <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p>
* <ul>
* <li>createJob(CreateJobRequest request)
* <li><p> createJob(CreateJobRequest request)
* </ul>
* <p>"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.</p>
* <ul>
* <li>createJob(LocationName parent, Job job, String jobId)
* <li>createJob(String parent, Job job, String jobId)
* <li><p> createJob(LocationName parent, Job job, String jobId)
* <li><p> createJob(String parent, Job job, String jobId)
* </ul>
* <p>Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.</p>
* <ul>
* <li>createJobCallable()
* <li><p> createJobCallable()
* </ul>
* </td>
* </tr>
* <tr>
* <td>GetJob</td>
* <td><p> GetJob</td>
* <td><p> Get a Job specified by its resource name.</td>
* <td>
* <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p>
* <ul>
* <li>getJob(GetJobRequest request)
* <li><p> getJob(GetJobRequest request)
* </ul>
* <p>"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.</p>
* <ul>
* <li>getJob(JobName name)
* <li>getJob(String name)
* <li><p> getJob(JobName name)
* <li><p> getJob(String name)
* </ul>
* <p>Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.</p>
* <ul>
* <li>getJobCallable()
* <li><p> getJobCallable()
* </ul>
* </td>
* </tr>
* <tr>
* <td>DeleteJob</td>
* <td><p> DeleteJob</td>
* <td><p> Delete a Job.</td>
* <td>
* <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p>
* <ul>
* <li>deleteJobAsync(DeleteJobRequest request)
* <li><p> deleteJobAsync(DeleteJobRequest request)
* </ul>
* <p>Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.</p>
* <ul>
* <li>deleteJobAsync(String name)
* <li><p> deleteJobAsync(String name)
* </ul>
* <p>Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.</p>
* <ul>
* <li>deleteJobOperationCallable()
* <li>deleteJobCallable()
* <li><p> deleteJobOperationCallable()
* <li><p> deleteJobCallable()
* </ul>
* </td>
* </tr>
* <tr>
* <td>ListJobs</td>
* <td><p> ListJobs</td>
* <td><p> List all Jobs for a project within a region.</td>
* <td>
* <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p>
* <ul>
* <li>listJobs(ListJobsRequest request)
* <li><p> listJobs(ListJobsRequest request)
* </ul>
* <p>"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.</p>
* <ul>
* <li>listJobs(String parent)
* <li><p> listJobs(String parent)
* </ul>
* <p>Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.</p>
* <ul>
* <li>listJobsPagedCallable()
* <li>listJobsCallable()
* <li><p> listJobsPagedCallable()
* <li><p> listJobsCallable()
* </ul>
* </td>
* </tr>
* <tr>
* <td>GetTask</td>
* <td><p> GetTask</td>
* <td><p> Return a single Task.</td>
* <td>
* <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p>
* <ul>
* <li>getTask(GetTaskRequest request)
* <li><p> getTask(GetTaskRequest request)
* </ul>
* <p>"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.</p>
* <ul>
* <li>getTask(TaskName name)
* <li>getTask(String name)
* <li><p> getTask(TaskName name)
* <li><p> getTask(String name)
* </ul>
* <p>Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.</p>
* <ul>
* <li>getTaskCallable()
* <li><p> getTaskCallable()
* </ul>
* </td>
* </tr>
* <tr>
* <td>ListTasks</td>
* <td><p> ListTasks</td>
* <td><p> List Tasks associated with a job.</td>
* <td>
* <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p>
* <ul>
* <li>listTasks(ListTasksRequest request)
* <li><p> listTasks(ListTasksRequest request)
* </ul>
* <p>"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.</p>
* <ul>
* <li>listTasks(TaskGroupName parent)
* <li>listTasks(String parent)
* <li><p> listTasks(TaskGroupName parent)
* <li><p> listTasks(String parent)
* </ul>
* <p>Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.</p>
* <ul>
* <li>listTasksPagedCallable()
* <li>listTasksCallable()
* <li><p> listTasksPagedCallable()
* <li><p> listTasksCallable()
* </ul>
* </td>
* </tr>
* <tr>
* <td>ListLocations</td>
* <td><p> ListLocations</td>
* <td><p> Lists information about the supported locations for this service.</td>
* <td>
* <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p>
* <ul>
* <li>listLocations(ListLocationsRequest request)
* <li><p> listLocations(ListLocationsRequest request)
* </ul>
* <p>Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.</p>
* <ul>
* <li>listLocationsPagedCallable()
* <li>listLocationsCallable()
* <li><p> listLocationsPagedCallable()
* <li><p> listLocationsCallable()
* </ul>
* </td>
* </tr>
* <tr>
* <td>GetLocation</td>
* <td><p> GetLocation</td>
* <td><p> Gets information about a location.</td>
* <td>
* <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p>
* <ul>
* <li>getLocation(GetLocationRequest request)
* <li><p> getLocation(GetLocationRequest request)
* </ul>
* <p>Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.</p>
* <ul>
* <li>getLocationCallable()
* <li><p> getLocationCallable()
* </ul>
* </td>
* </tr>
* </tr>
* </table>
*
* <p>See the individual methods for example code.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,15 @@ public BatchServiceStub createStub() throws IOException {
"Transport not supported: %s", getTransportChannelProvider().getTransportName()));
}

/** Returns the endpoint set by the user or the the service's default endpoint. */
@Override
public String getEndpoint() {
if (super.getEndpoint() != null) {
return super.getEndpoint();
}
return getDefaultEndpoint();
}

/** Returns the default service name. */
@Override
public String getServiceName() {
Expand Down Expand Up @@ -587,7 +596,6 @@ private static Builder createDefault() {
builder.setTransportChannelProvider(defaultTransportChannelProvider());
builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build());
builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build());
builder.setEndpoint(getDefaultEndpoint());
builder.setMtlsEndpoint(getDefaultMtlsEndpoint());
builder.setSwitchToMtlsEndpointAllowed(true);

Expand All @@ -600,7 +608,6 @@ private static Builder createHttpJsonDefault() {
builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build());
builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build());
builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build());
builder.setEndpoint(getDefaultEndpoint());
builder.setMtlsEndpoint(getDefaultMtlsEndpoint());
builder.setSwitchToMtlsEndpointAllowed(true);

Expand Down Expand Up @@ -741,6 +748,15 @@ public UnaryCallSettings.Builder<GetLocationRequest, Location> getLocationSettin
return getLocationSettings;
}

/** Returns the endpoint set by the user or the the service's default endpoint. */
@Override
public String getEndpoint() {
if (super.getEndpoint() != null) {
return super.getEndpoint();
}
return getDefaultEndpoint();
}

@Override
public BatchServiceStubSettings build() throws IOException {
return new BatchServiceStubSettings(this);
Expand Down
Loading