/* * Copyright 2018-2023 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.licensemanager.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *

* The options you can specify when you create a new version of a grant, such as activation override behavior. For more * information, see Granted * licenses in License Manager in the License Manager User Guide. *

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

* An activation option for your grant that determines the behavior of activating a grant. Activation options can * only be used with granted licenses sourced from the Amazon Web Services Marketplace. Additionally, the operation * must specify the value of ACTIVE for the Status parameter. *

* *
*
DISTRIBUTED_GRANTS_ONLY
*
*

* Use this value to activate a grant without replacing any member account’s active grants for the same product. *

*
*
ALL_GRANTS_PERMITTED_BY_ISSUER
*
*

* Use this value to activate a grant and disable other active grants in any member accounts for the same product. * This action will also replace their previously activated grants with this activated grant. *

*
*
*/ private String activationOverrideBehavior; /** *

* An activation option for your grant that determines the behavior of activating a grant. Activation options can * only be used with granted licenses sourced from the Amazon Web Services Marketplace. Additionally, the operation * must specify the value of ACTIVE for the Status parameter. *

* *
*
DISTRIBUTED_GRANTS_ONLY
*
*

* Use this value to activate a grant without replacing any member account’s active grants for the same product. *

*
*
ALL_GRANTS_PERMITTED_BY_ISSUER
*
*

* Use this value to activate a grant and disable other active grants in any member accounts for the same product. * This action will also replace their previously activated grants with this activated grant. *

*
*
* * @param activationOverrideBehavior * An activation option for your grant that determines the behavior of activating a grant. Activation options * can only be used with granted licenses sourced from the Amazon Web Services Marketplace. Additionally, the * operation must specify the value of ACTIVE for the Status parameter.

* *
*
DISTRIBUTED_GRANTS_ONLY
*
*

* Use this value to activate a grant without replacing any member account’s active grants for the same * product. *

*
*
ALL_GRANTS_PERMITTED_BY_ISSUER
*
*

* Use this value to activate a grant and disable other active grants in any member accounts for the same * product. This action will also replace their previously activated grants with this activated grant. *

*
* @see ActivationOverrideBehavior */ public void setActivationOverrideBehavior(String activationOverrideBehavior) { this.activationOverrideBehavior = activationOverrideBehavior; } /** *

* An activation option for your grant that determines the behavior of activating a grant. Activation options can * only be used with granted licenses sourced from the Amazon Web Services Marketplace. Additionally, the operation * must specify the value of ACTIVE for the Status parameter. *

* *
*
DISTRIBUTED_GRANTS_ONLY
*
*

* Use this value to activate a grant without replacing any member account’s active grants for the same product. *

*
*
ALL_GRANTS_PERMITTED_BY_ISSUER
*
*

* Use this value to activate a grant and disable other active grants in any member accounts for the same product. * This action will also replace their previously activated grants with this activated grant. *

*
*
* * @return An activation option for your grant that determines the behavior of activating a grant. Activation * options can only be used with granted licenses sourced from the Amazon Web Services Marketplace. * Additionally, the operation must specify the value of ACTIVE for the Status * parameter.

* *
*
DISTRIBUTED_GRANTS_ONLY
*
*

* Use this value to activate a grant without replacing any member account’s active grants for the same * product. *

*
*
ALL_GRANTS_PERMITTED_BY_ISSUER
*
*

* Use this value to activate a grant and disable other active grants in any member accounts for the same * product. This action will also replace their previously activated grants with this activated grant. *

*
* @see ActivationOverrideBehavior */ public String getActivationOverrideBehavior() { return this.activationOverrideBehavior; } /** *

* An activation option for your grant that determines the behavior of activating a grant. Activation options can * only be used with granted licenses sourced from the Amazon Web Services Marketplace. Additionally, the operation * must specify the value of ACTIVE for the Status parameter. *

* *
*
DISTRIBUTED_GRANTS_ONLY
*
*

* Use this value to activate a grant without replacing any member account’s active grants for the same product. *

*
*
ALL_GRANTS_PERMITTED_BY_ISSUER
*
*

* Use this value to activate a grant and disable other active grants in any member accounts for the same product. * This action will also replace their previously activated grants with this activated grant. *

*
*
* * @param activationOverrideBehavior * An activation option for your grant that determines the behavior of activating a grant. Activation options * can only be used with granted licenses sourced from the Amazon Web Services Marketplace. Additionally, the * operation must specify the value of ACTIVE for the Status parameter.

* *
*
DISTRIBUTED_GRANTS_ONLY
*
*

* Use this value to activate a grant without replacing any member account’s active grants for the same * product. *

*
*
ALL_GRANTS_PERMITTED_BY_ISSUER
*
*

* Use this value to activate a grant and disable other active grants in any member accounts for the same * product. This action will also replace their previously activated grants with this activated grant. *

*
* @return Returns a reference to this object so that method calls can be chained together. * @see ActivationOverrideBehavior */ public Options withActivationOverrideBehavior(String activationOverrideBehavior) { setActivationOverrideBehavior(activationOverrideBehavior); return this; } /** *

* An activation option for your grant that determines the behavior of activating a grant. Activation options can * only be used with granted licenses sourced from the Amazon Web Services Marketplace. Additionally, the operation * must specify the value of ACTIVE for the Status parameter. *

*
    *
  • *

    * As a license administrator, you can optionally specify an ActivationOverrideBehavior when activating * a grant. *

    *
  • *
  • *

    * As a grantor, you can optionally specify an ActivationOverrideBehavior when you activate a grant for * a grantee account in your organization. *

    *
  • *
  • *

    * As a grantee, if the grantor creating the distributed grant doesn’t specify an * ActivationOverrideBehavior, you can optionally specify one when you are activating the grant. *

    *
  • *
*
*
DISTRIBUTED_GRANTS_ONLY
*
*

* Use this value to activate a grant without replacing any member account’s active grants for the same product. *

*
*
ALL_GRANTS_PERMITTED_BY_ISSUER
*
*

* Use this value to activate a grant and disable other active grants in any member accounts for the same product. * This action will also replace their previously activated grants with this activated grant. *

*
*
* * @param activationOverrideBehavior * An activation option for your grant that determines the behavior of activating a grant. Activation options * can only be used with granted licenses sourced from the Amazon Web Services Marketplace. Additionally, the * operation must specify the value of ACTIVE for the Status parameter.

*
    *
  • *

    * As a license administrator, you can optionally specify an ActivationOverrideBehavior when * activating a grant. *

    *
  • *
  • *

    * As a grantor, you can optionally specify an ActivationOverrideBehavior when you activate a * grant for a grantee account in your organization. *

    *
  • *
  • *

    * As a grantee, if the grantor creating the distributed grant doesn’t specify an * ActivationOverrideBehavior, you can optionally specify one when you are activating the grant. *

    *
  • *
*
*
DISTRIBUTED_GRANTS_ONLY
*
*

* Use this value to activate a grant without replacing any member account’s active grants for the same * product. *

*
*
ALL_GRANTS_PERMITTED_BY_ISSUER
*
*

* Use this value to activate a grant and disable other active grants in any member accounts for the same * product. This action will also replace their previously activated grants with this activated grant. *

*
* @return Returns a reference to this object so that method calls can be chained together. * @see ActivationOverrideBehavior */ public Options withActivationOverrideBehavior(ActivationOverrideBehavior activationOverrideBehavior) { this.activationOverrideBehavior = activationOverrideBehavior.toString(); 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 (getActivationOverrideBehavior() != null) sb.append("ActivationOverrideBehavior: ").append(getActivationOverrideBehavior()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Options == false) return false; Options other = (Options) obj; if (other.getActivationOverrideBehavior() == null ^ this.getActivationOverrideBehavior() == null) return false; if (other.getActivationOverrideBehavior() != null && other.getActivationOverrideBehavior().equals(this.getActivationOverrideBehavior()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getActivationOverrideBehavior() == null) ? 0 : getActivationOverrideBehavior().hashCode()); return hashCode; } @Override public Options clone() { try { return (Options) 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.licensemanager.model.transform.OptionsMarshaller.getInstance().marshall(this, protocolMarshaller); } }