Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
regen
  • Loading branch information
weidongxu-microsoft committed Jun 6, 2025
commit 056a76a9b5c5e712495e5ece432ba0072b82286b
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.resources.fluent;

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

/**
* The interface for DeploymentsManagementClient class.
*/
public interface DeploymentsManagementClient {
/**
* Gets The Microsoft Azure subscription ID.
*
* @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 DeploymentsClient object to access its operations.
*
* @return the DeploymentsClient object.
*/
DeploymentsClient getDeployments();

/**
* Gets the DeploymentOperationsClient object to access its operations.
*
* @return the DeploymentOperationsClient object.
*/
DeploymentOperationsClient getDeploymentOperations();
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,6 @@ public interface ResourceManagementClient {
*/
OperationsClient getOperations();

/**
* Gets the DeploymentsClient object to access its operations.
*
* @return the DeploymentsClient object.
*/
DeploymentsClient getDeployments();

/**
* Gets the ProvidersClient object to access its operations.
*
Expand Down Expand Up @@ -94,11 +87,4 @@ public interface ResourceManagementClient {
* @return the TagOperationsClient object.
*/
TagOperationsClient getTagOperations();

/**
* Gets the DeploymentOperationsClient object to access its operations.
*
* @return the DeploymentOperationsClient object.
*/
DeploymentOperationsClient getDeploymentOperations();
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,25 +42,25 @@ public final class DeploymentOperationsClientImpl implements DeploymentOperation
/**
* The service client containing this operation class.
*/
private final ResourceManagementClientImpl client;
private final DeploymentsManagementClientImpl client;

/**
* Initializes an instance of DeploymentOperationsClientImpl.
*
* @param client the instance of the service client containing this operation class.
*/
DeploymentOperationsClientImpl(ResourceManagementClientImpl client) {
DeploymentOperationsClientImpl(DeploymentsManagementClientImpl client) {
this.service = RestProxy.create(DeploymentOperationsService.class, client.getHttpPipeline(),
client.getSerializerAdapter());
this.client = client;
}

/**
* The interface defining all the services for ResourceManagementClientDeploymentOperations to be used by the proxy
* service to perform REST calls.
* The interface defining all the services for DeploymentsManagementClientDeploymentOperations to be used by the
* proxy service to perform REST calls.
*/
@Host("{$host}")
@ServiceInterface(name = "ResourceManagementCl")
@ServiceInterface(name = "DeploymentsManagemen")
public interface DeploymentOperationsService {
@Headers({ "Content-Type: application/json" })
@Get("/{scope}/providers/Microsoft.Resources/deployments/{deploymentName}/operations/{operationId}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,25 +64,25 @@ public final class DeploymentsClientImpl implements InnerSupportsGet<DeploymentE
/**
* The service client containing this operation class.
*/
private final ResourceManagementClientImpl client;
private final DeploymentsManagementClientImpl client;

/**
* Initializes an instance of DeploymentsClientImpl.
*
* @param client the instance of the service client containing this operation class.
*/
DeploymentsClientImpl(ResourceManagementClientImpl client) {
DeploymentsClientImpl(DeploymentsManagementClientImpl client) {
this.service
= RestProxy.create(DeploymentsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
this.client = client;
}

/**
* The interface defining all the services for ResourceManagementClientDeployments to be used by the proxy service
* to perform REST calls.
* The interface defining all the services for DeploymentsManagementClientDeployments to be used by the proxy
* service to perform REST calls.
*/
@Host("{$host}")
@ServiceInterface(name = "ResourceManagementCl")
@ServiceInterface(name = "DeploymentsManagemen")
public interface DeploymentsService {
@Headers({ "Content-Type: application/json" })
@Delete("/{scope}/providers/Microsoft.Resources/deployments/{deploymentName}")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.resources.implementation;

import com.azure.core.annotation.ServiceClientBuilder;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.AzureEnvironment;
import com.azure.core.management.serializer.SerializerFactory;
import com.azure.core.util.serializer.SerializerAdapter;
import java.time.Duration;

/**
* A builder for creating a new instance of the DeploymentsManagementClientImpl type.
*/
@ServiceClientBuilder(serviceClients = { DeploymentsManagementClientImpl.class })
public final class DeploymentsManagementClientBuilder {
/*
* The Microsoft Azure subscription ID.
*/
private String subscriptionId;

/**
* Sets The Microsoft Azure subscription ID.
*
* @param subscriptionId the subscriptionId value.
* @return the DeploymentsManagementClientBuilder.
*/
public DeploymentsManagementClientBuilder subscriptionId(String subscriptionId) {
this.subscriptionId = subscriptionId;
return this;
}

/*
* server parameter
*/
private String endpoint;

/**
* Sets server parameter.
*
* @param endpoint the endpoint value.
* @return the DeploymentsManagementClientBuilder.
*/
public DeploymentsManagementClientBuilder endpoint(String endpoint) {
this.endpoint = endpoint;
return this;
}

/*
* The environment to connect to
*/
private AzureEnvironment environment;

/**
* Sets The environment to connect to.
*
* @param environment the environment value.
* @return the DeploymentsManagementClientBuilder.
*/
public DeploymentsManagementClientBuilder environment(AzureEnvironment environment) {
this.environment = environment;
return this;
}

/*
* The HTTP pipeline to send requests through
*/
private HttpPipeline pipeline;

/**
* Sets The HTTP pipeline to send requests through.
*
* @param pipeline the pipeline value.
* @return the DeploymentsManagementClientBuilder.
*/
public DeploymentsManagementClientBuilder pipeline(HttpPipeline pipeline) {
this.pipeline = pipeline;
return this;
}

/*
* The default poll interval for long-running operation
*/
private Duration defaultPollInterval;

/**
* Sets The default poll interval for long-running operation.
*
* @param defaultPollInterval the defaultPollInterval value.
* @return the DeploymentsManagementClientBuilder.
*/
public DeploymentsManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) {
this.defaultPollInterval = defaultPollInterval;
return this;
}

/*
* The serializer to serialize an object into a string
*/
private SerializerAdapter serializerAdapter;

/**
* Sets The serializer to serialize an object into a string.
*
* @param serializerAdapter the serializerAdapter value.
* @return the DeploymentsManagementClientBuilder.
*/
public DeploymentsManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
this.serializerAdapter = serializerAdapter;
return this;
}

/**
* Builds an instance of DeploymentsManagementClientImpl with the provided parameters.
*
* @return an instance of DeploymentsManagementClientImpl.
*/
public DeploymentsManagementClientImpl buildClient() {
String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com";
AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE;
HttpPipeline localPipeline = (pipeline != null)
? pipeline
: new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
Duration localDefaultPollInterval
= (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30);
SerializerAdapter localSerializerAdapter = (serializerAdapter != null)
? serializerAdapter
: SerializerFactory.createDefaultManagementSerializerAdapter();
DeploymentsManagementClientImpl client = new DeploymentsManagementClientImpl(localPipeline,
localSerializerAdapter, localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint);
return client;
}
}
Loading