
com.oracle.bmc.identity.model.Tenancy Maven / Gradle / Ivy
/**
* Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
*/
package com.oracle.bmc.identity.model;
/**
* The root compartment that contains all of your organization's compartments and other
* Oracle Cloud Infrastructure cloud resources. When you sign up for Oracle Cloud Infrastructure,
* Oracle creates a tenancy for your company, which is a secure and isolated partition
* where you can create, organize, and administer your cloud resources.
*
* To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized,
* talk to an administrator. If you're an administrator who needs to write policies to give users access,
* see [Getting Started with Policies](https://docs.cloud.oracle.com/Content/Identity/Concepts/policygetstarted.htm).
*
*
* Note: Objects should always be created or deserialized using the {@link Builder}. This model distinguishes fields
* that are {@code null} because they are unset from fields that are explicitly set to {@code null}. This is done in
* the setter methods of the {@link Builder}, which maintain a set of all explicitly set fields called
* {@link #__explicitlySet__}. The {@link #hashCode()} and {@link #equals(Object)} methods are implemented to take
* {@link #__explicitlySet__} into account. The constructor, on the other hand, does not set {@link #__explicitlySet__}
* (since the constructor cannot distinguish explicit {@code null} from unset {@code null}).
**/
@javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20160918")
@lombok.AllArgsConstructor(onConstructor = @__({@Deprecated}))
@lombok.Value
@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Tenancy.Builder.class)
@com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.internal.ExplicitlySetFilter.NAME)
@lombok.Builder(builderClassName = "Builder", toBuilder = true)
public class Tenancy {
@com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "")
@lombok.experimental.Accessors(fluent = true)
public static class Builder {
@com.fasterxml.jackson.annotation.JsonProperty("id")
private String id;
public Builder id(String id) {
this.id = id;
this.__explicitlySet__.add("id");
return this;
}
@com.fasterxml.jackson.annotation.JsonProperty("name")
private String name;
public Builder name(String name) {
this.name = name;
this.__explicitlySet__.add("name");
return this;
}
@com.fasterxml.jackson.annotation.JsonProperty("description")
private String description;
public Builder description(String description) {
this.description = description;
this.__explicitlySet__.add("description");
return this;
}
@com.fasterxml.jackson.annotation.JsonProperty("homeRegionKey")
private String homeRegionKey;
public Builder homeRegionKey(String homeRegionKey) {
this.homeRegionKey = homeRegionKey;
this.__explicitlySet__.add("homeRegionKey");
return this;
}
@com.fasterxml.jackson.annotation.JsonProperty("upiIdcsCompatibilityLayerEndpoint")
private String upiIdcsCompatibilityLayerEndpoint;
public Builder upiIdcsCompatibilityLayerEndpoint(String upiIdcsCompatibilityLayerEndpoint) {
this.upiIdcsCompatibilityLayerEndpoint = upiIdcsCompatibilityLayerEndpoint;
this.__explicitlySet__.add("upiIdcsCompatibilityLayerEndpoint");
return this;
}
@com.fasterxml.jackson.annotation.JsonProperty("freeformTags")
private java.util.Map freeformTags;
public Builder freeformTags(java.util.Map freeformTags) {
this.freeformTags = freeformTags;
this.__explicitlySet__.add("freeformTags");
return this;
}
@com.fasterxml.jackson.annotation.JsonProperty("definedTags")
private java.util.Map> definedTags;
public Builder definedTags(
java.util.Map> definedTags) {
this.definedTags = definedTags;
this.__explicitlySet__.add("definedTags");
return this;
}
@com.fasterxml.jackson.annotation.JsonIgnore
private final java.util.Set __explicitlySet__ = new java.util.HashSet();
public Tenancy build() {
Tenancy __instance__ =
new Tenancy(
id,
name,
description,
homeRegionKey,
upiIdcsCompatibilityLayerEndpoint,
freeformTags,
definedTags);
__instance__.__explicitlySet__.addAll(__explicitlySet__);
return __instance__;
}
@com.fasterxml.jackson.annotation.JsonIgnore
public Builder copy(Tenancy o) {
Builder copiedBuilder =
id(o.getId())
.name(o.getName())
.description(o.getDescription())
.homeRegionKey(o.getHomeRegionKey())
.upiIdcsCompatibilityLayerEndpoint(
o.getUpiIdcsCompatibilityLayerEndpoint())
.freeformTags(o.getFreeformTags())
.definedTags(o.getDefinedTags());
copiedBuilder.__explicitlySet__.retainAll(o.__explicitlySet__);
return copiedBuilder;
}
}
/**
* Create a new builder.
*/
public static Builder builder() {
return new Builder();
}
/**
* The OCID of the tenancy.
**/
@com.fasterxml.jackson.annotation.JsonProperty("id")
String id;
/**
* The name of the tenancy.
**/
@com.fasterxml.jackson.annotation.JsonProperty("name")
String name;
/**
* The description of the tenancy.
**/
@com.fasterxml.jackson.annotation.JsonProperty("description")
String description;
/**
* The region key for the tenancy's home region. For the full list of supported regions, see
* [Regions and Availability Domains](https://docs.cloud.oracle.com/Content/General/Concepts/regions.htm).
*
* Example: {@code PHX}
*
**/
@com.fasterxml.jackson.annotation.JsonProperty("homeRegionKey")
String homeRegionKey;
/**
* Url which refers to the UPI IDCS compatibility layer endpoint configured for this Tenant's home region.
**/
@com.fasterxml.jackson.annotation.JsonProperty("upiIdcsCompatibilityLayerEndpoint")
String upiIdcsCompatibilityLayerEndpoint;
/**
* Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
* For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
* Example: {@code {"Department": "Finance"}}
*
**/
@com.fasterxml.jackson.annotation.JsonProperty("freeformTags")
java.util.Map freeformTags;
/**
* Defined tags for this resource. Each key is predefined and scoped to a namespace.
* For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
* Example: {@code {"Operations": {"CostCenter": "42"}}}
*
**/
@com.fasterxml.jackson.annotation.JsonProperty("definedTags")
java.util.Map> definedTags;
@com.fasterxml.jackson.annotation.JsonIgnore
private final java.util.Set __explicitlySet__ = new java.util.HashSet();
}