Skip to content
Draft
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 @@ -6,7 +6,9 @@
import com.azure.core.credential.TokenCredential;
import com.azure.core.http.HttpPipeline;
import com.azure.resourcemanager.containerregistry.fluent.ContainerRegistryManagementClient;
import com.azure.resourcemanager.containerregistry.fluent.ContainerRegistryTasksManagementClient;
import com.azure.resourcemanager.containerregistry.implementation.ContainerRegistryManagementClientBuilder;
import com.azure.resourcemanager.containerregistry.implementation.ContainerRegistryTasksManagementClientBuilder;
import com.azure.resourcemanager.containerregistry.implementation.RegistriesImpl;
import com.azure.resourcemanager.containerregistry.implementation.RegistryTaskRunsImpl;
import com.azure.resourcemanager.containerregistry.implementation.RegistryTasksImpl;
Expand All @@ -28,6 +30,8 @@ public final class ContainerRegistryManager extends Manager<ContainerRegistryMan
private RegistryTasksImpl tasks;
private RegistryTaskRunsImpl registryTaskRuns;

private final ContainerRegistryTasksManagementClient taskClient;

/**
* Get a Configurable instance that can be used to create ContainerRegistryManager with optional configuration.
*
Expand Down Expand Up @@ -95,6 +99,11 @@ private ContainerRegistryManager(HttpPipeline httpPipeline, AzureProfile profile
.endpoint(profile.getEnvironment().getResourceManagerEndpoint())
.subscriptionId(profile.getSubscriptionId())
.buildClient());

this.taskClient = new ContainerRegistryTasksManagementClientBuilder().pipeline(httpPipeline)
.endpoint(profile.getEnvironment().getResourceManagerEndpoint())
.subscriptionId(profile.getSubscriptionId())
.buildClient();
}

/**
Expand Down Expand Up @@ -132,4 +141,14 @@ public RegistryTaskRuns registryTaskRuns() {
}
return this.registryTaskRuns;
}

/**
* Gets wrapped inner task client providing direct access to auto-generated API implementation,
* based on Azure REST API.
*
* @return wrapped inner task client.
*/
public ContainerRegistryTasksManagementClient taskClient() {
return taskClient;
}
}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ public interface ContainerRegistryManagementClient {
*/
String getEndpoint();

/**
* Gets Api Version.
*
* @return the apiVersion value.
*/
String getApiVersion();

/**
* Gets The HTTP pipeline to send requests through.
*
Expand Down Expand Up @@ -108,32 +115,4 @@ public interface ContainerRegistryManagementClient {
* @return the WebhooksClient object.
*/
WebhooksClient getWebhooks();

/**
* Gets the AgentPoolsClient object to access its operations.
*
* @return the AgentPoolsClient object.
*/
AgentPoolsClient getAgentPools();

/**
* Gets the RunsClient object to access its operations.
*
* @return the RunsClient object.
*/
RunsClient getRuns();

/**
* Gets the TaskRunsClient object to access its operations.
*
* @return the TaskRunsClient object.
*/
TaskRunsClient getTaskRuns();

/**
* Gets the TasksClient object to access its operations.
*
* @return the TasksClient object.
*/
TasksClient getTasks();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.containerregistry.fluent;

import com.azure.core.http.HttpPipeline;
import java.time.Duration;

/**
* The interface for ContainerRegistryTasksManagementClient class.
*/
public interface ContainerRegistryTasksManagementClient {
/**
* Gets The ID of the target subscription. The value must be an UUID.
*
* @return the subscriptionId value.
*/
String getSubscriptionId();

/**
* Gets server parameter.
*
* @return the endpoint value.
*/
String getEndpoint();

/**
* Gets Api Version.
*
* @return the apiVersion value.
*/
String getApiVersion();

/**
* Gets The HTTP pipeline to send requests through.
*
* @return the httpPipeline value.
*/
HttpPipeline getHttpPipeline();

/**
* Gets The default poll interval for long-running operation.
*
* @return the defaultPollInterval value.
*/
Duration getDefaultPollInterval();

/**
* Gets the AgentPoolsClient object to access its operations.
*
* @return the AgentPoolsClient object.
*/
AgentPoolsClient getAgentPools();

/**
* Gets the RegistryTasksClient object to access its operations.
*
* @return the RegistryTasksClient object.
*/
RegistryTasksClient getRegistryTasks();

/**
* Gets the RunsClient object to access its operations.
*
* @return the RunsClient object.
*/
RunsClient getRuns();

/**
* Gets the TaskRunsClient object to access its operations.
*
* @return the TaskRunsClient object.
*/
TaskRunsClient getTaskRuns();

/**
* Gets the TasksClient object to access its operations.
*
* @return the TasksClient object.
*/
TasksClient getTasks();
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,11 @@
import com.azure.resourcemanager.containerregistry.fluent.models.RegistryListCredentialsResultInner;
import com.azure.resourcemanager.containerregistry.fluent.models.RegistryNameStatusInner;
import com.azure.resourcemanager.containerregistry.fluent.models.RegistryUsageListResultInner;
import com.azure.resourcemanager.containerregistry.fluent.models.RunInner;
import com.azure.resourcemanager.containerregistry.fluent.models.SourceUploadDefinitionInner;
import com.azure.resourcemanager.containerregistry.models.GenerateCredentialsParameters;
import com.azure.resourcemanager.containerregistry.models.ImportImageParameters;
import com.azure.resourcemanager.containerregistry.models.RegenerateCredentialParameters;
import com.azure.resourcemanager.containerregistry.models.RegistryNameCheckRequest;
import com.azure.resourcemanager.containerregistry.models.RegistryUpdateParameters;
import com.azure.resourcemanager.containerregistry.models.RunRequest;
import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete;
import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet;
import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing;
Expand Down Expand Up @@ -1020,165 +1017,4 @@ GenerateCredentialsResultInner generateCredentials(String resourceGroupName, Str
@ServiceMethod(returns = ReturnType.SINGLE)
GenerateCredentialsResultInner generateCredentials(String resourceGroupName, String registryName,
GenerateCredentialsParameters generateCredentialsParameters, Context context);

/**
* Schedules a new run based on the request parameters and add it to the run queue.
*
* @param resourceGroupName The name of the resource group to which the container registry belongs.
* @param registryName The name of the container registry.
* @param runRequest The parameters of a run that needs to scheduled.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return run resource properties along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Mono<Response<Flux<ByteBuffer>>> scheduleRunWithResponseAsync(String resourceGroupName, String registryName,
RunRequest runRequest);

/**
* Schedules a new run based on the request parameters and add it to the run queue.
*
* @param resourceGroupName The name of the resource group to which the container registry belongs.
* @param registryName The name of the container registry.
* @param runRequest The parameters of a run that needs to scheduled.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the {@link PollerFlux} for polling of run resource properties.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
PollerFlux<PollResult<RunInner>, RunInner> beginScheduleRunAsync(String resourceGroupName, String registryName,
RunRequest runRequest);

/**
* Schedules a new run based on the request parameters and add it to the run queue.
*
* @param resourceGroupName The name of the resource group to which the container registry belongs.
* @param registryName The name of the container registry.
* @param runRequest The parameters of a run that needs to scheduled.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the {@link SyncPoller} for polling of run resource properties.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<RunInner>, RunInner> beginScheduleRun(String resourceGroupName, String registryName,
RunRequest runRequest);

/**
* Schedules a new run based on the request parameters and add it to the run queue.
*
* @param resourceGroupName The name of the resource group to which the container registry belongs.
* @param registryName The name of the container registry.
* @param runRequest The parameters of a run that needs to scheduled.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the {@link SyncPoller} for polling of run resource properties.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<RunInner>, RunInner> beginScheduleRun(String resourceGroupName, String registryName,
RunRequest runRequest, Context context);

/**
* Schedules a new run based on the request parameters and add it to the run queue.
*
* @param resourceGroupName The name of the resource group to which the container registry belongs.
* @param registryName The name of the container registry.
* @param runRequest The parameters of a run that needs to scheduled.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return run resource properties on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Mono<RunInner> scheduleRunAsync(String resourceGroupName, String registryName, RunRequest runRequest);

/**
* Schedules a new run based on the request parameters and add it to the run queue.
*
* @param resourceGroupName The name of the resource group to which the container registry belongs.
* @param registryName The name of the container registry.
* @param runRequest The parameters of a run that needs to scheduled.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return run resource properties.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
RunInner scheduleRun(String resourceGroupName, String registryName, RunRequest runRequest);

/**
* Schedules a new run based on the request parameters and add it to the run queue.
*
* @param resourceGroupName The name of the resource group to which the container registry belongs.
* @param registryName The name of the container registry.
* @param runRequest The parameters of a run that needs to scheduled.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return run resource properties.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
RunInner scheduleRun(String resourceGroupName, String registryName, RunRequest runRequest, Context context);

/**
* Get the upload location for the user to be able to upload the source.
*
* @param resourceGroupName The name of the resource group to which the container registry belongs.
* @param registryName The name of the container registry.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the upload location for the user to be able to upload the source along with {@link Response} on
* successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Mono<Response<SourceUploadDefinitionInner>> getBuildSourceUploadUrlWithResponseAsync(String resourceGroupName,
String registryName);

/**
* Get the upload location for the user to be able to upload the source.
*
* @param resourceGroupName The name of the resource group to which the container registry belongs.
* @param registryName The name of the container registry.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the upload location for the user to be able to upload the source on successful completion of
* {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Mono<SourceUploadDefinitionInner> getBuildSourceUploadUrlAsync(String resourceGroupName, String registryName);

/**
* Get the upload location for the user to be able to upload the source.
*
* @param resourceGroupName The name of the resource group to which the container registry belongs.
* @param registryName The name of the container registry.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the upload location for the user to be able to upload the source along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<SourceUploadDefinitionInner> getBuildSourceUploadUrlWithResponse(String resourceGroupName,
String registryName, Context context);

/**
* Get the upload location for the user to be able to upload the source.
*
* @param resourceGroupName The name of the resource group to which the container registry belongs.
* @param registryName The name of the container registry.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the upload location for the user to be able to upload the source.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
SourceUploadDefinitionInner getBuildSourceUploadUrl(String resourceGroupName, String registryName);
}
Loading
Loading