/* * 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.accessanalyzer.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 GetGeneratedPolicyRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The JobId
that is returned by the StartPolicyGeneration
operation. The
* JobId
can be used with GetGeneratedPolicy
to retrieve the generated policies or used
* with CancelPolicyGeneration
to cancel the policy generation request.
*
* The level of detail that you want to generate. You can specify whether to generate policies with placeholders for * resource ARNs for actions that support resource level granularity in policies. *
*
* For example, in the resource section of a policy, you can receive a placeholder such as
* "Resource":"arn:aws:s3:::${BucketName}"
instead of "*"
.
*
* The level of detail that you want to generate. You can specify whether to generate service-level policies. *
*
* IAM Access Analyzer uses iam:servicelastaccessed
to identify services that have been used recently
* to create this service-level template.
*
* The JobId
that is returned by the StartPolicyGeneration
operation. The
* JobId
can be used with GetGeneratedPolicy
to retrieve the generated policies or used
* with CancelPolicyGeneration
to cancel the policy generation request.
*
JobId
that is returned by the StartPolicyGeneration
operation. The
* JobId
can be used with GetGeneratedPolicy
to retrieve the generated policies or
* used with CancelPolicyGeneration
to cancel the policy generation request.
*/
public void setJobId(String jobId) {
this.jobId = jobId;
}
/**
*
* The JobId
that is returned by the StartPolicyGeneration
operation. The
* JobId
can be used with GetGeneratedPolicy
to retrieve the generated policies or used
* with CancelPolicyGeneration
to cancel the policy generation request.
*
JobId
that is returned by the StartPolicyGeneration
operation. The
* JobId
can be used with GetGeneratedPolicy
to retrieve the generated policies or
* used with CancelPolicyGeneration
to cancel the policy generation request.
*/
public String getJobId() {
return this.jobId;
}
/**
*
* The JobId
that is returned by the StartPolicyGeneration
operation. The
* JobId
can be used with GetGeneratedPolicy
to retrieve the generated policies or used
* with CancelPolicyGeneration
to cancel the policy generation request.
*
JobId
that is returned by the StartPolicyGeneration
operation. The
* JobId
can be used with GetGeneratedPolicy
to retrieve the generated policies or
* used with CancelPolicyGeneration
to cancel the policy generation request.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetGeneratedPolicyRequest withJobId(String jobId) {
setJobId(jobId);
return this;
}
/**
* * The level of detail that you want to generate. You can specify whether to generate policies with placeholders for * resource ARNs for actions that support resource level granularity in policies. *
*
* For example, in the resource section of a policy, you can receive a placeholder such as
* "Resource":"arn:aws:s3:::${BucketName}"
instead of "*"
.
*
* For example, in the resource section of a policy, you can receive a placeholder such as
* "Resource":"arn:aws:s3:::${BucketName}"
instead of "*"
.
*/
public void setIncludeResourcePlaceholders(Boolean includeResourcePlaceholders) {
this.includeResourcePlaceholders = includeResourcePlaceholders;
}
/**
*
* The level of detail that you want to generate. You can specify whether to generate policies with placeholders for * resource ARNs for actions that support resource level granularity in policies. *
*
* For example, in the resource section of a policy, you can receive a placeholder such as
* "Resource":"arn:aws:s3:::${BucketName}"
instead of "*"
.
*
* For example, in the resource section of a policy, you can receive a placeholder such as
* "Resource":"arn:aws:s3:::${BucketName}"
instead of "*"
.
*/
public Boolean getIncludeResourcePlaceholders() {
return this.includeResourcePlaceholders;
}
/**
*
* The level of detail that you want to generate. You can specify whether to generate policies with placeholders for * resource ARNs for actions that support resource level granularity in policies. *
*
* For example, in the resource section of a policy, you can receive a placeholder such as
* "Resource":"arn:aws:s3:::${BucketName}"
instead of "*"
.
*
* For example, in the resource section of a policy, you can receive a placeholder such as
* "Resource":"arn:aws:s3:::${BucketName}"
instead of "*"
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetGeneratedPolicyRequest withIncludeResourcePlaceholders(Boolean includeResourcePlaceholders) {
setIncludeResourcePlaceholders(includeResourcePlaceholders);
return this;
}
/**
*
* The level of detail that you want to generate. You can specify whether to generate policies with placeholders for * resource ARNs for actions that support resource level granularity in policies. *
*
* For example, in the resource section of a policy, you can receive a placeholder such as
* "Resource":"arn:aws:s3:::${BucketName}"
instead of "*"
.
*
* For example, in the resource section of a policy, you can receive a placeholder such as
* "Resource":"arn:aws:s3:::${BucketName}"
instead of "*"
.
*/
public Boolean isIncludeResourcePlaceholders() {
return this.includeResourcePlaceholders;
}
/**
*
* The level of detail that you want to generate. You can specify whether to generate service-level policies. *
*
* IAM Access Analyzer uses iam:servicelastaccessed
to identify services that have been used recently
* to create this service-level template.
*
* IAM Access Analyzer uses iam:servicelastaccessed
to identify services that have been used
* recently to create this service-level template.
*/
public void setIncludeServiceLevelTemplate(Boolean includeServiceLevelTemplate) {
this.includeServiceLevelTemplate = includeServiceLevelTemplate;
}
/**
*
* The level of detail that you want to generate. You can specify whether to generate service-level policies. *
*
* IAM Access Analyzer uses iam:servicelastaccessed
to identify services that have been used recently
* to create this service-level template.
*
* IAM Access Analyzer uses iam:servicelastaccessed
to identify services that have been used
* recently to create this service-level template.
*/
public Boolean getIncludeServiceLevelTemplate() {
return this.includeServiceLevelTemplate;
}
/**
*
* The level of detail that you want to generate. You can specify whether to generate service-level policies. *
*
* IAM Access Analyzer uses iam:servicelastaccessed
to identify services that have been used recently
* to create this service-level template.
*
* IAM Access Analyzer uses iam:servicelastaccessed
to identify services that have been used
* recently to create this service-level template.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetGeneratedPolicyRequest withIncludeServiceLevelTemplate(Boolean includeServiceLevelTemplate) {
setIncludeServiceLevelTemplate(includeServiceLevelTemplate);
return this;
}
/**
*
* The level of detail that you want to generate. You can specify whether to generate service-level policies. *
*
* IAM Access Analyzer uses iam:servicelastaccessed
to identify services that have been used recently
* to create this service-level template.
*
* IAM Access Analyzer uses iam:servicelastaccessed
to identify services that have been used
* recently to create this service-level template.
*/
public Boolean isIncludeServiceLevelTemplate() {
return this.includeServiceLevelTemplate;
}
/**
* 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 (getJobId() != null)
sb.append("JobId: ").append(getJobId()).append(",");
if (getIncludeResourcePlaceholders() != null)
sb.append("IncludeResourcePlaceholders: ").append(getIncludeResourcePlaceholders()).append(",");
if (getIncludeServiceLevelTemplate() != null)
sb.append("IncludeServiceLevelTemplate: ").append(getIncludeServiceLevelTemplate());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof GetGeneratedPolicyRequest == false)
return false;
GetGeneratedPolicyRequest other = (GetGeneratedPolicyRequest) obj;
if (other.getJobId() == null ^ this.getJobId() == null)
return false;
if (other.getJobId() != null && other.getJobId().equals(this.getJobId()) == false)
return false;
if (other.getIncludeResourcePlaceholders() == null ^ this.getIncludeResourcePlaceholders() == null)
return false;
if (other.getIncludeResourcePlaceholders() != null && other.getIncludeResourcePlaceholders().equals(this.getIncludeResourcePlaceholders()) == false)
return false;
if (other.getIncludeServiceLevelTemplate() == null ^ this.getIncludeServiceLevelTemplate() == null)
return false;
if (other.getIncludeServiceLevelTemplate() != null && other.getIncludeServiceLevelTemplate().equals(this.getIncludeServiceLevelTemplate()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getJobId() == null) ? 0 : getJobId().hashCode());
hashCode = prime * hashCode + ((getIncludeResourcePlaceholders() == null) ? 0 : getIncludeResourcePlaceholders().hashCode());
hashCode = prime * hashCode + ((getIncludeServiceLevelTemplate() == null) ? 0 : getIncludeServiceLevelTemplate().hashCode());
return hashCode;
}
@Override
public GetGeneratedPolicyRequest clone() {
return (GetGeneratedPolicyRequest) super.clone();
}
}