All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.servicequotas.model.QuotaContextInfo Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Service Quotas module holds the client classes that are used for communicating with Service Quotas Service

There is a newer version: 1.12.780
Show newest version
/*
 * Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */
package com.amazonaws.services.servicequotas.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* A structure that describes the context for a service quota. The context identifies what the quota applies to. *

* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class QuotaContextInfo implements Serializable, Cloneable, StructuredPojo { /** *

* Specifies whether the quota applies to an Amazon Web Services account, or to a resource. *

*/ private String contextScope; /** *

* When the ContextScope is RESOURCE, then this specifies the resource type of the * specified resource. *

*/ private String contextScopeType; /** *

* Specifies the Amazon Web Services account or resource to which the quota applies. The value in this field depends * on the context scope associated with the specified service quota. *

*/ private String contextId; /** *

* Specifies whether the quota applies to an Amazon Web Services account, or to a resource. *

* * @param contextScope * Specifies whether the quota applies to an Amazon Web Services account, or to a resource. * @see QuotaContextScope */ public void setContextScope(String contextScope) { this.contextScope = contextScope; } /** *

* Specifies whether the quota applies to an Amazon Web Services account, or to a resource. *

* * @return Specifies whether the quota applies to an Amazon Web Services account, or to a resource. * @see QuotaContextScope */ public String getContextScope() { return this.contextScope; } /** *

* Specifies whether the quota applies to an Amazon Web Services account, or to a resource. *

* * @param contextScope * Specifies whether the quota applies to an Amazon Web Services account, or to a resource. * @return Returns a reference to this object so that method calls can be chained together. * @see QuotaContextScope */ public QuotaContextInfo withContextScope(String contextScope) { setContextScope(contextScope); return this; } /** *

* Specifies whether the quota applies to an Amazon Web Services account, or to a resource. *

* * @param contextScope * Specifies whether the quota applies to an Amazon Web Services account, or to a resource. * @return Returns a reference to this object so that method calls can be chained together. * @see QuotaContextScope */ public QuotaContextInfo withContextScope(QuotaContextScope contextScope) { this.contextScope = contextScope.toString(); return this; } /** *

* When the ContextScope is RESOURCE, then this specifies the resource type of the * specified resource. *

* * @param contextScopeType * When the ContextScope is RESOURCE, then this specifies the resource type of the * specified resource. */ public void setContextScopeType(String contextScopeType) { this.contextScopeType = contextScopeType; } /** *

* When the ContextScope is RESOURCE, then this specifies the resource type of the * specified resource. *

* * @return When the ContextScope is RESOURCE, then this specifies the resource type of the * specified resource. */ public String getContextScopeType() { return this.contextScopeType; } /** *

* When the ContextScope is RESOURCE, then this specifies the resource type of the * specified resource. *

* * @param contextScopeType * When the ContextScope is RESOURCE, then this specifies the resource type of the * specified resource. * @return Returns a reference to this object so that method calls can be chained together. */ public QuotaContextInfo withContextScopeType(String contextScopeType) { setContextScopeType(contextScopeType); return this; } /** *

* Specifies the Amazon Web Services account or resource to which the quota applies. The value in this field depends * on the context scope associated with the specified service quota. *

* * @param contextId * Specifies the Amazon Web Services account or resource to which the quota applies. The value in this field * depends on the context scope associated with the specified service quota. */ public void setContextId(String contextId) { this.contextId = contextId; } /** *

* Specifies the Amazon Web Services account or resource to which the quota applies. The value in this field depends * on the context scope associated with the specified service quota. *

* * @return Specifies the Amazon Web Services account or resource to which the quota applies. The value in this field * depends on the context scope associated with the specified service quota. */ public String getContextId() { return this.contextId; } /** *

* Specifies the Amazon Web Services account or resource to which the quota applies. The value in this field depends * on the context scope associated with the specified service quota. *

* * @param contextId * Specifies the Amazon Web Services account or resource to which the quota applies. The value in this field * depends on the context scope associated with the specified service quota. * @return Returns a reference to this object so that method calls can be chained together. */ public QuotaContextInfo withContextId(String contextId) { setContextId(contextId); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getContextScope() != null) sb.append("ContextScope: ").append(getContextScope()).append(","); if (getContextScopeType() != null) sb.append("ContextScopeType: ").append(getContextScopeType()).append(","); if (getContextId() != null) sb.append("ContextId: ").append(getContextId()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof QuotaContextInfo == false) return false; QuotaContextInfo other = (QuotaContextInfo) obj; if (other.getContextScope() == null ^ this.getContextScope() == null) return false; if (other.getContextScope() != null && other.getContextScope().equals(this.getContextScope()) == false) return false; if (other.getContextScopeType() == null ^ this.getContextScopeType() == null) return false; if (other.getContextScopeType() != null && other.getContextScopeType().equals(this.getContextScopeType()) == false) return false; if (other.getContextId() == null ^ this.getContextId() == null) return false; if (other.getContextId() != null && other.getContextId().equals(this.getContextId()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getContextScope() == null) ? 0 : getContextScope().hashCode()); hashCode = prime * hashCode + ((getContextScopeType() == null) ? 0 : getContextScopeType().hashCode()); hashCode = prime * hashCode + ((getContextId() == null) ? 0 : getContextId().hashCode()); return hashCode; } @Override public QuotaContextInfo clone() { try { return (QuotaContextInfo) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.servicequotas.model.transform.QuotaContextInfoMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy