com.azure.resourcemanager.security.implementation.AzureDevOpsOrgImpl Maven / Gradle / Ivy
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.security.implementation;
import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.security.fluent.models.AzureDevOpsOrgInner;
import com.azure.resourcemanager.security.models.AzureDevOpsOrg;
import com.azure.resourcemanager.security.models.AzureDevOpsOrgProperties;
public final class AzureDevOpsOrgImpl implements AzureDevOpsOrg, AzureDevOpsOrg.Definition, AzureDevOpsOrg.Update {
private AzureDevOpsOrgInner innerObject;
private final com.azure.resourcemanager.security.SecurityManager serviceManager;
public String id() {
return this.innerModel().id();
}
public String name() {
return this.innerModel().name();
}
public String type() {
return this.innerModel().type();
}
public SystemData systemData() {
return this.innerModel().systemData();
}
public AzureDevOpsOrgProperties properties() {
return this.innerModel().properties();
}
public String resourceGroupName() {
return resourceGroupName;
}
public AzureDevOpsOrgInner innerModel() {
return this.innerObject;
}
private com.azure.resourcemanager.security.SecurityManager manager() {
return this.serviceManager;
}
private String resourceGroupName;
private String securityConnectorName;
private String orgName;
public AzureDevOpsOrgImpl withExistingSecurityConnector(String resourceGroupName, String securityConnectorName) {
this.resourceGroupName = resourceGroupName;
this.securityConnectorName = securityConnectorName;
return this;
}
public AzureDevOpsOrg create() {
this.innerObject = serviceManager.serviceClient()
.getAzureDevOpsOrgs()
.createOrUpdate(resourceGroupName, securityConnectorName, orgName, this.innerModel(), Context.NONE);
return this;
}
public AzureDevOpsOrg create(Context context) {
this.innerObject = serviceManager.serviceClient()
.getAzureDevOpsOrgs()
.createOrUpdate(resourceGroupName, securityConnectorName, orgName, this.innerModel(), context);
return this;
}
AzureDevOpsOrgImpl(String name, com.azure.resourcemanager.security.SecurityManager serviceManager) {
this.innerObject = new AzureDevOpsOrgInner();
this.serviceManager = serviceManager;
this.orgName = name;
}
public AzureDevOpsOrgImpl update() {
return this;
}
public AzureDevOpsOrg apply() {
this.innerObject = serviceManager.serviceClient()
.getAzureDevOpsOrgs()
.update(resourceGroupName, securityConnectorName, orgName, this.innerModel(), Context.NONE);
return this;
}
public AzureDevOpsOrg apply(Context context) {
this.innerObject = serviceManager.serviceClient()
.getAzureDevOpsOrgs()
.update(resourceGroupName, securityConnectorName, orgName, this.innerModel(), context);
return this;
}
AzureDevOpsOrgImpl(AzureDevOpsOrgInner innerObject,
com.azure.resourcemanager.security.SecurityManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
this.securityConnectorName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "securityConnectors");
this.orgName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "azureDevOpsOrgs");
}
public AzureDevOpsOrg refresh() {
this.innerObject = serviceManager.serviceClient()
.getAzureDevOpsOrgs()
.getWithResponse(resourceGroupName, securityConnectorName, orgName, Context.NONE)
.getValue();
return this;
}
public AzureDevOpsOrg refresh(Context context) {
this.innerObject = serviceManager.serviceClient()
.getAzureDevOpsOrgs()
.getWithResponse(resourceGroupName, securityConnectorName, orgName, context)
.getValue();
return this;
}
public AzureDevOpsOrgImpl withProperties(AzureDevOpsOrgProperties properties) {
this.innerModel().withProperties(properties);
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy