com.amazonaws.services.s3control.model.UpdateAccessGrantsLocationRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-s3control Show documentation
/*
* 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.s3control.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class UpdateAccessGrantsLocationRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The ID of the Amazon Web Services account that is making this request.
*
*/
private String accountId;
/**
*
* The ID of the registered location that you are updating. S3 Access Grants assigns this ID when you register the
* location. S3 Access Grants assigns the ID default
to the default location s3://
and
* assigns an auto-generated ID to other locations that you register.
*
*
* The ID of the registered location to which you are granting access. S3 Access Grants assigned this ID when you
* registered the location. S3 Access Grants assigns the ID default
to the default location
* s3://
and assigns an auto-generated ID to other locations that you register.
*
*
* If you are passing the default
location, you cannot create an access grant for the entire default
* location. You must also specify a bucket or a bucket and prefix in the Subprefix
field.
*
*/
private String accessGrantsLocationId;
/**
*
* The Amazon Resource Name (ARN) of the IAM role for the registered location. S3 Access Grants assumes this role to
* manage access to the registered location.
*
*/
private String iAMRoleArn;
/**
*
* The ID of the Amazon Web Services account that is making this request.
*
*
* @param accountId
* The ID of the Amazon Web Services account that is making this request.
*/
public void setAccountId(String accountId) {
this.accountId = accountId;
}
/**
*
* The ID of the Amazon Web Services account that is making this request.
*
*
* @return The ID of the Amazon Web Services account that is making this request.
*/
public String getAccountId() {
return this.accountId;
}
/**
*
* The ID of the Amazon Web Services account that is making this request.
*
*
* @param accountId
* The ID of the Amazon Web Services account that is making this request.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateAccessGrantsLocationRequest withAccountId(String accountId) {
setAccountId(accountId);
return this;
}
/**
*
* The ID of the registered location that you are updating. S3 Access Grants assigns this ID when you register the
* location. S3 Access Grants assigns the ID default
to the default location s3://
and
* assigns an auto-generated ID to other locations that you register.
*
*
* The ID of the registered location to which you are granting access. S3 Access Grants assigned this ID when you
* registered the location. S3 Access Grants assigns the ID default
to the default location
* s3://
and assigns an auto-generated ID to other locations that you register.
*
*
* If you are passing the default
location, you cannot create an access grant for the entire default
* location. You must also specify a bucket or a bucket and prefix in the Subprefix
field.
*
*
* @param accessGrantsLocationId
* The ID of the registered location that you are updating. S3 Access Grants assigns this ID when you
* register the location. S3 Access Grants assigns the ID default
to the default location
* s3://
and assigns an auto-generated ID to other locations that you register.
*
* The ID of the registered location to which you are granting access. S3 Access Grants assigned this ID when
* you registered the location. S3 Access Grants assigns the ID default
to the default location
* s3://
and assigns an auto-generated ID to other locations that you register.
*
*
* If you are passing the default
location, you cannot create an access grant for the entire
* default location. You must also specify a bucket or a bucket and prefix in the Subprefix
* field.
*/
public void setAccessGrantsLocationId(String accessGrantsLocationId) {
this.accessGrantsLocationId = accessGrantsLocationId;
}
/**
*
* The ID of the registered location that you are updating. S3 Access Grants assigns this ID when you register the
* location. S3 Access Grants assigns the ID default
to the default location s3://
and
* assigns an auto-generated ID to other locations that you register.
*
*
* The ID of the registered location to which you are granting access. S3 Access Grants assigned this ID when you
* registered the location. S3 Access Grants assigns the ID default
to the default location
* s3://
and assigns an auto-generated ID to other locations that you register.
*
*
* If you are passing the default
location, you cannot create an access grant for the entire default
* location. You must also specify a bucket or a bucket and prefix in the Subprefix
field.
*
*
* @return The ID of the registered location that you are updating. S3 Access Grants assigns this ID when you
* register the location. S3 Access Grants assigns the ID default
to the default location
* s3://
and assigns an auto-generated ID to other locations that you register.
*
* The ID of the registered location to which you are granting access. S3 Access Grants assigned this ID
* when you registered the location. S3 Access Grants assigns the ID default
to the default
* location s3://
and assigns an auto-generated ID to other locations that you register.
*
*
* If you are passing the default
location, you cannot create an access grant for the entire
* default location. You must also specify a bucket or a bucket and prefix in the Subprefix
* field.
*/
public String getAccessGrantsLocationId() {
return this.accessGrantsLocationId;
}
/**
*
* The ID of the registered location that you are updating. S3 Access Grants assigns this ID when you register the
* location. S3 Access Grants assigns the ID default
to the default location s3://
and
* assigns an auto-generated ID to other locations that you register.
*
*
* The ID of the registered location to which you are granting access. S3 Access Grants assigned this ID when you
* registered the location. S3 Access Grants assigns the ID default
to the default location
* s3://
and assigns an auto-generated ID to other locations that you register.
*
*
* If you are passing the default
location, you cannot create an access grant for the entire default
* location. You must also specify a bucket or a bucket and prefix in the Subprefix
field.
*
*
* @param accessGrantsLocationId
* The ID of the registered location that you are updating. S3 Access Grants assigns this ID when you
* register the location. S3 Access Grants assigns the ID default
to the default location
* s3://
and assigns an auto-generated ID to other locations that you register.
*
* The ID of the registered location to which you are granting access. S3 Access Grants assigned this ID when
* you registered the location. S3 Access Grants assigns the ID default
to the default location
* s3://
and assigns an auto-generated ID to other locations that you register.
*
*
* If you are passing the default
location, you cannot create an access grant for the entire
* default location. You must also specify a bucket or a bucket and prefix in the Subprefix
* field.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateAccessGrantsLocationRequest withAccessGrantsLocationId(String accessGrantsLocationId) {
setAccessGrantsLocationId(accessGrantsLocationId);
return this;
}
/**
*
* The Amazon Resource Name (ARN) of the IAM role for the registered location. S3 Access Grants assumes this role to
* manage access to the registered location.
*
*
* @param iAMRoleArn
* The Amazon Resource Name (ARN) of the IAM role for the registered location. S3 Access Grants assumes this
* role to manage access to the registered location.
*/
public void setIAMRoleArn(String iAMRoleArn) {
this.iAMRoleArn = iAMRoleArn;
}
/**
*
* The Amazon Resource Name (ARN) of the IAM role for the registered location. S3 Access Grants assumes this role to
* manage access to the registered location.
*
*
* @return The Amazon Resource Name (ARN) of the IAM role for the registered location. S3 Access Grants assumes this
* role to manage access to the registered location.
*/
public String getIAMRoleArn() {
return this.iAMRoleArn;
}
/**
*
* The Amazon Resource Name (ARN) of the IAM role for the registered location. S3 Access Grants assumes this role to
* manage access to the registered location.
*
*
* @param iAMRoleArn
* The Amazon Resource Name (ARN) of the IAM role for the registered location. S3 Access Grants assumes this
* role to manage access to the registered location.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateAccessGrantsLocationRequest withIAMRoleArn(String iAMRoleArn) {
setIAMRoleArn(iAMRoleArn);
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 (getAccountId() != null)
sb.append("AccountId: ").append(getAccountId()).append(",");
if (getAccessGrantsLocationId() != null)
sb.append("AccessGrantsLocationId: ").append(getAccessGrantsLocationId()).append(",");
if (getIAMRoleArn() != null)
sb.append("IAMRoleArn: ").append(getIAMRoleArn());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof UpdateAccessGrantsLocationRequest == false)
return false;
UpdateAccessGrantsLocationRequest other = (UpdateAccessGrantsLocationRequest) obj;
if (other.getAccountId() == null ^ this.getAccountId() == null)
return false;
if (other.getAccountId() != null && other.getAccountId().equals(this.getAccountId()) == false)
return false;
if (other.getAccessGrantsLocationId() == null ^ this.getAccessGrantsLocationId() == null)
return false;
if (other.getAccessGrantsLocationId() != null && other.getAccessGrantsLocationId().equals(this.getAccessGrantsLocationId()) == false)
return false;
if (other.getIAMRoleArn() == null ^ this.getIAMRoleArn() == null)
return false;
if (other.getIAMRoleArn() != null && other.getIAMRoleArn().equals(this.getIAMRoleArn()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getAccountId() == null) ? 0 : getAccountId().hashCode());
hashCode = prime * hashCode + ((getAccessGrantsLocationId() == null) ? 0 : getAccessGrantsLocationId().hashCode());
hashCode = prime * hashCode + ((getIAMRoleArn() == null) ? 0 : getIAMRoleArn().hashCode());
return hashCode;
}
@Override
public UpdateAccessGrantsLocationRequest clone() {
return (UpdateAccessGrantsLocationRequest) super.clone();
}
}