PolicyClientImpl.java
// 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.ServiceClient;
import com.azure.core.http.HttpPipeline;
import com.azure.core.management.AzureEnvironment;
import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.serializer.SerializerAdapter;
import com.azure.resourcemanager.resources.fluent.PolicyAssignmentsClient;
import com.azure.resourcemanager.resources.fluent.PolicyClient;
import com.azure.resourcemanager.resources.fluent.PolicyDefinitionsClient;
import com.azure.resourcemanager.resources.fluent.PolicySetDefinitionsClient;
import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient;
import java.time.Duration;
/** Initializes a new instance of the PolicyClientImpl type. */
@ServiceClient(builder = PolicyClientBuilder.class)
public final class PolicyClientImpl extends AzureServiceClient implements PolicyClient {
private final ClientLogger logger = new ClientLogger(PolicyClientImpl.class);
/** The ID of the target subscription. */
private final String subscriptionId;
/**
* Gets The ID of the target subscription.
*
* @return the subscriptionId value.
*/
public String getSubscriptionId() {
return this.subscriptionId;
}
/** server parameter. */
private final String endpoint;
/**
* Gets server parameter.
*
* @return the endpoint value.
*/
public String getEndpoint() {
return this.endpoint;
}
/** Api Version. */
private final String apiVersion;
/**
* Gets Api Version.
*
* @return the apiVersion value.
*/
public String getApiVersion() {
return this.apiVersion;
}
/** The HTTP pipeline to send requests through. */
private final HttpPipeline httpPipeline;
/**
* Gets The HTTP pipeline to send requests through.
*
* @return the httpPipeline value.
*/
public HttpPipeline getHttpPipeline() {
return this.httpPipeline;
}
/** The serializer to serialize an object into a string. */
private final SerializerAdapter serializerAdapter;
/**
* Gets The serializer to serialize an object into a string.
*
* @return the serializerAdapter value.
*/
SerializerAdapter getSerializerAdapter() {
return this.serializerAdapter;
}
/** The default poll interval for long-running operation. */
private final Duration defaultPollInterval;
/**
* Gets The default poll interval for long-running operation.
*
* @return the defaultPollInterval value.
*/
public Duration getDefaultPollInterval() {
return this.defaultPollInterval;
}
/** The PolicyAssignmentsClient object to access its operations. */
private final PolicyAssignmentsClient policyAssignments;
/**
* Gets the PolicyAssignmentsClient object to access its operations.
*
* @return the PolicyAssignmentsClient object.
*/
public PolicyAssignmentsClient getPolicyAssignments() {
return this.policyAssignments;
}
/** The PolicyDefinitionsClient object to access its operations. */
private final PolicyDefinitionsClient policyDefinitions;
/**
* Gets the PolicyDefinitionsClient object to access its operations.
*
* @return the PolicyDefinitionsClient object.
*/
public PolicyDefinitionsClient getPolicyDefinitions() {
return this.policyDefinitions;
}
/** The PolicySetDefinitionsClient object to access its operations. */
private final PolicySetDefinitionsClient policySetDefinitions;
/**
* Gets the PolicySetDefinitionsClient object to access its operations.
*
* @return the PolicySetDefinitionsClient object.
*/
public PolicySetDefinitionsClient getPolicySetDefinitions() {
return this.policySetDefinitions;
}
/**
* Initializes an instance of PolicyClient client.
*
* @param httpPipeline The HTTP pipeline to send requests through.
* @param serializerAdapter The serializer to serialize an object into a string.
* @param defaultPollInterval The default poll interval for long-running operation.
* @param environment The Azure environment.
* @param subscriptionId The ID of the target subscription.
* @param endpoint server parameter.
*/
PolicyClientImpl(
HttpPipeline httpPipeline,
SerializerAdapter serializerAdapter,
Duration defaultPollInterval,
AzureEnvironment environment,
String subscriptionId,
String endpoint) {
super(httpPipeline, serializerAdapter, environment);
this.httpPipeline = httpPipeline;
this.serializerAdapter = serializerAdapter;
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
this.apiVersion = "2019-09-01";
this.policyAssignments = new PolicyAssignmentsClientImpl(this);
this.policyDefinitions = new PolicyDefinitionsClientImpl(this);
this.policySetDefinitions = new PolicySetDefinitionsClientImpl(this);
}
}