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

software.amazon.awssdk.services.codebuild.model.GetReportGroupTrendRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Code Build module holds the client classes that are used for communicating with AWS Code Build.

There is a newer version: 2.29.39
Show newest version
/*
 * Copyright 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 software.amazon.awssdk.services.codebuild.model;

import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.awscore.AwsRequestOverrideConfiguration;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 */
@Generated("software.amazon.awssdk:codegen")
public final class GetReportGroupTrendRequest extends CodeBuildRequest implements
        ToCopyableBuilder {
    private static final SdkField REPORT_GROUP_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("reportGroupArn").getter(getter(GetReportGroupTrendRequest::reportGroupArn))
            .setter(setter(Builder::reportGroupArn))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("reportGroupArn").build()).build();

    private static final SdkField NUM_OF_REPORTS_FIELD = SdkField. builder(MarshallingType.INTEGER)
            .memberName("numOfReports").getter(getter(GetReportGroupTrendRequest::numOfReports))
            .setter(setter(Builder::numOfReports))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("numOfReports").build()).build();

    private static final SdkField TREND_FIELD_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("trendField").getter(getter(GetReportGroupTrendRequest::trendFieldAsString))
            .setter(setter(Builder::trendField))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("trendField").build()).build();

    private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(REPORT_GROUP_ARN_FIELD,
            NUM_OF_REPORTS_FIELD, TREND_FIELD_FIELD));

    private static final Map> SDK_NAME_TO_FIELD = Collections
            .unmodifiableMap(new HashMap>() {
                {
                    put("reportGroupArn", REPORT_GROUP_ARN_FIELD);
                    put("numOfReports", NUM_OF_REPORTS_FIELD);
                    put("trendField", TREND_FIELD_FIELD);
                }
            });

    private final String reportGroupArn;

    private final Integer numOfReports;

    private final String trendField;

    private GetReportGroupTrendRequest(BuilderImpl builder) {
        super(builder);
        this.reportGroupArn = builder.reportGroupArn;
        this.numOfReports = builder.numOfReports;
        this.trendField = builder.trendField;
    }

    /**
     * 

* The ARN of the report group that contains the reports to analyze. *

* * @return The ARN of the report group that contains the reports to analyze. */ public final String reportGroupArn() { return reportGroupArn; } /** *

* The number of reports to analyze. This operation always retrieves the most recent reports. *

*

* If this parameter is omitted, the most recent 100 reports are analyzed. *

* * @return The number of reports to analyze. This operation always retrieves the most recent reports.

*

* If this parameter is omitted, the most recent 100 reports are analyzed. */ public final Integer numOfReports() { return numOfReports; } /** *

* The test report value to accumulate. This must be one of the following values: *

*
*
Test reports:
*
*
*
DURATION
*
*

* Accumulate the test run times for the specified reports. *

*
*
PASS_RATE
*
*

* Accumulate the percentage of tests that passed for the specified test reports. *

*
*
TOTAL
*
*

* Accumulate the total number of tests for the specified test reports. *

*
*
*
*
*
*
Code coverage reports:
*
*
*
BRANCH_COVERAGE
*
*

* Accumulate the branch coverage percentages for the specified test reports. *

*
*
BRANCHES_COVERED
*
*

* Accumulate the branches covered values for the specified test reports. *

*
*
BRANCHES_MISSED
*
*

* Accumulate the branches missed values for the specified test reports. *

*
*
LINE_COVERAGE
*
*

* Accumulate the line coverage percentages for the specified test reports. *

*
*
LINES_COVERED
*
*

* Accumulate the lines covered values for the specified test reports. *

*
*
LINES_MISSED
*
*

* Accumulate the lines not covered values for the specified test reports. *

*
*
*
*
*

* If the service returns an enum value that is not available in the current SDK version, {@link #trendField} will * return {@link ReportGroupTrendFieldType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is * available from {@link #trendFieldAsString}. *

* * @return The test report value to accumulate. This must be one of the following values:

*
*
Test reports:
*
*
*
DURATION
*
*

* Accumulate the test run times for the specified reports. *

*
*
PASS_RATE
*
*

* Accumulate the percentage of tests that passed for the specified test reports. *

*
*
TOTAL
*
*

* Accumulate the total number of tests for the specified test reports. *

*
*
*
*
*
*
Code coverage reports:
*
*
*
BRANCH_COVERAGE
*
*

* Accumulate the branch coverage percentages for the specified test reports. *

*
*
BRANCHES_COVERED
*
*

* Accumulate the branches covered values for the specified test reports. *

*
*
BRANCHES_MISSED
*
*

* Accumulate the branches missed values for the specified test reports. *

*
*
LINE_COVERAGE
*
*

* Accumulate the line coverage percentages for the specified test reports. *

*
*
LINES_COVERED
*
*

* Accumulate the lines covered values for the specified test reports. *

*
*
LINES_MISSED
*
*

* Accumulate the lines not covered values for the specified test reports. *

*
*
*
* @see ReportGroupTrendFieldType */ public final ReportGroupTrendFieldType trendField() { return ReportGroupTrendFieldType.fromValue(trendField); } /** *

* The test report value to accumulate. This must be one of the following values: *

*
*
Test reports:
*
*
*
DURATION
*
*

* Accumulate the test run times for the specified reports. *

*
*
PASS_RATE
*
*

* Accumulate the percentage of tests that passed for the specified test reports. *

*
*
TOTAL
*
*

* Accumulate the total number of tests for the specified test reports. *

*
*
*
*
*
*
Code coverage reports:
*
*
*
BRANCH_COVERAGE
*
*

* Accumulate the branch coverage percentages for the specified test reports. *

*
*
BRANCHES_COVERED
*
*

* Accumulate the branches covered values for the specified test reports. *

*
*
BRANCHES_MISSED
*
*

* Accumulate the branches missed values for the specified test reports. *

*
*
LINE_COVERAGE
*
*

* Accumulate the line coverage percentages for the specified test reports. *

*
*
LINES_COVERED
*
*

* Accumulate the lines covered values for the specified test reports. *

*
*
LINES_MISSED
*
*

* Accumulate the lines not covered values for the specified test reports. *

*
*
*
*
*

* If the service returns an enum value that is not available in the current SDK version, {@link #trendField} will * return {@link ReportGroupTrendFieldType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is * available from {@link #trendFieldAsString}. *

* * @return The test report value to accumulate. This must be one of the following values:

*
*
Test reports:
*
*
*
DURATION
*
*

* Accumulate the test run times for the specified reports. *

*
*
PASS_RATE
*
*

* Accumulate the percentage of tests that passed for the specified test reports. *

*
*
TOTAL
*
*

* Accumulate the total number of tests for the specified test reports. *

*
*
*
*
*
*
Code coverage reports:
*
*
*
BRANCH_COVERAGE
*
*

* Accumulate the branch coverage percentages for the specified test reports. *

*
*
BRANCHES_COVERED
*
*

* Accumulate the branches covered values for the specified test reports. *

*
*
BRANCHES_MISSED
*
*

* Accumulate the branches missed values for the specified test reports. *

*
*
LINE_COVERAGE
*
*

* Accumulate the line coverage percentages for the specified test reports. *

*
*
LINES_COVERED
*
*

* Accumulate the lines covered values for the specified test reports. *

*
*
LINES_MISSED
*
*

* Accumulate the lines not covered values for the specified test reports. *

*
*
*
* @see ReportGroupTrendFieldType */ public final String trendFieldAsString() { return trendField; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public final int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + super.hashCode(); hashCode = 31 * hashCode + Objects.hashCode(reportGroupArn()); hashCode = 31 * hashCode + Objects.hashCode(numOfReports()); hashCode = 31 * hashCode + Objects.hashCode(trendFieldAsString()); return hashCode; } @Override public final boolean equals(Object obj) { return super.equals(obj) && equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof GetReportGroupTrendRequest)) { return false; } GetReportGroupTrendRequest other = (GetReportGroupTrendRequest) obj; return Objects.equals(reportGroupArn(), other.reportGroupArn()) && Objects.equals(numOfReports(), other.numOfReports()) && Objects.equals(trendFieldAsString(), other.trendFieldAsString()); } /** * 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. */ @Override public final String toString() { return ToString.builder("GetReportGroupTrendRequest").add("ReportGroupArn", reportGroupArn()) .add("NumOfReports", numOfReports()).add("TrendField", trendFieldAsString()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "reportGroupArn": return Optional.ofNullable(clazz.cast(reportGroupArn())); case "numOfReports": return Optional.ofNullable(clazz.cast(numOfReports())); case "trendField": return Optional.ofNullable(clazz.cast(trendFieldAsString())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } @Override public final Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } private static Function getter(Function g) { return obj -> g.apply((GetReportGroupTrendRequest) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends CodeBuildRequest.Builder, SdkPojo, CopyableBuilder { /** *

* The ARN of the report group that contains the reports to analyze. *

* * @param reportGroupArn * The ARN of the report group that contains the reports to analyze. * @return Returns a reference to this object so that method calls can be chained together. */ Builder reportGroupArn(String reportGroupArn); /** *

* The number of reports to analyze. This operation always retrieves the most recent reports. *

*

* If this parameter is omitted, the most recent 100 reports are analyzed. *

* * @param numOfReports * The number of reports to analyze. This operation always retrieves the most recent reports.

*

* If this parameter is omitted, the most recent 100 reports are analyzed. * @return Returns a reference to this object so that method calls can be chained together. */ Builder numOfReports(Integer numOfReports); /** *

* The test report value to accumulate. This must be one of the following values: *

*
*
Test reports:
*
*
*
DURATION
*
*

* Accumulate the test run times for the specified reports. *

*
*
PASS_RATE
*
*

* Accumulate the percentage of tests that passed for the specified test reports. *

*
*
TOTAL
*
*

* Accumulate the total number of tests for the specified test reports. *

*
*
*
*
*
*
Code coverage reports:
*
*
*
BRANCH_COVERAGE
*
*

* Accumulate the branch coverage percentages for the specified test reports. *

*
*
BRANCHES_COVERED
*
*

* Accumulate the branches covered values for the specified test reports. *

*
*
BRANCHES_MISSED
*
*

* Accumulate the branches missed values for the specified test reports. *

*
*
LINE_COVERAGE
*
*

* Accumulate the line coverage percentages for the specified test reports. *

*
*
LINES_COVERED
*
*

* Accumulate the lines covered values for the specified test reports. *

*
*
LINES_MISSED
*
*

* Accumulate the lines not covered values for the specified test reports. *

*
*
*
*
* * @param trendField * The test report value to accumulate. This must be one of the following values:

*
*
Test reports:
*
*
*
DURATION
*
*

* Accumulate the test run times for the specified reports. *

*
*
PASS_RATE
*
*

* Accumulate the percentage of tests that passed for the specified test reports. *

*
*
TOTAL
*
*

* Accumulate the total number of tests for the specified test reports. *

*
*
*
*
*
*
Code coverage reports:
*
*
*
BRANCH_COVERAGE
*
*

* Accumulate the branch coverage percentages for the specified test reports. *

*
*
BRANCHES_COVERED
*
*

* Accumulate the branches covered values for the specified test reports. *

*
*
BRANCHES_MISSED
*
*

* Accumulate the branches missed values for the specified test reports. *

*
*
LINE_COVERAGE
*
*

* Accumulate the line coverage percentages for the specified test reports. *

*
*
LINES_COVERED
*
*

* Accumulate the lines covered values for the specified test reports. *

*
*
LINES_MISSED
*
*

* Accumulate the lines not covered values for the specified test reports. *

*
*
*
* @see ReportGroupTrendFieldType * @return Returns a reference to this object so that method calls can be chained together. * @see ReportGroupTrendFieldType */ Builder trendField(String trendField); /** *

* The test report value to accumulate. This must be one of the following values: *

*
*
Test reports:
*
*
*
DURATION
*
*

* Accumulate the test run times for the specified reports. *

*
*
PASS_RATE
*
*

* Accumulate the percentage of tests that passed for the specified test reports. *

*
*
TOTAL
*
*

* Accumulate the total number of tests for the specified test reports. *

*
*
*
*
*
*
Code coverage reports:
*
*
*
BRANCH_COVERAGE
*
*

* Accumulate the branch coverage percentages for the specified test reports. *

*
*
BRANCHES_COVERED
*
*

* Accumulate the branches covered values for the specified test reports. *

*
*
BRANCHES_MISSED
*
*

* Accumulate the branches missed values for the specified test reports. *

*
*
LINE_COVERAGE
*
*

* Accumulate the line coverage percentages for the specified test reports. *

*
*
LINES_COVERED
*
*

* Accumulate the lines covered values for the specified test reports. *

*
*
LINES_MISSED
*
*

* Accumulate the lines not covered values for the specified test reports. *

*
*
*
*
* * @param trendField * The test report value to accumulate. This must be one of the following values:

*
*
Test reports:
*
*
*
DURATION
*
*

* Accumulate the test run times for the specified reports. *

*
*
PASS_RATE
*
*

* Accumulate the percentage of tests that passed for the specified test reports. *

*
*
TOTAL
*
*

* Accumulate the total number of tests for the specified test reports. *

*
*
*
*
*
*
Code coverage reports:
*
*
*
BRANCH_COVERAGE
*
*

* Accumulate the branch coverage percentages for the specified test reports. *

*
*
BRANCHES_COVERED
*
*

* Accumulate the branches covered values for the specified test reports. *

*
*
BRANCHES_MISSED
*
*

* Accumulate the branches missed values for the specified test reports. *

*
*
LINE_COVERAGE
*
*

* Accumulate the line coverage percentages for the specified test reports. *

*
*
LINES_COVERED
*
*

* Accumulate the lines covered values for the specified test reports. *

*
*
LINES_MISSED
*
*

* Accumulate the lines not covered values for the specified test reports. *

*
*
*
* @see ReportGroupTrendFieldType * @return Returns a reference to this object so that method calls can be chained together. * @see ReportGroupTrendFieldType */ Builder trendField(ReportGroupTrendFieldType trendField); @Override Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration); @Override Builder overrideConfiguration(Consumer builderConsumer); } static final class BuilderImpl extends CodeBuildRequest.BuilderImpl implements Builder { private String reportGroupArn; private Integer numOfReports; private String trendField; private BuilderImpl() { } private BuilderImpl(GetReportGroupTrendRequest model) { super(model); reportGroupArn(model.reportGroupArn); numOfReports(model.numOfReports); trendField(model.trendField); } public final String getReportGroupArn() { return reportGroupArn; } public final void setReportGroupArn(String reportGroupArn) { this.reportGroupArn = reportGroupArn; } @Override public final Builder reportGroupArn(String reportGroupArn) { this.reportGroupArn = reportGroupArn; return this; } public final Integer getNumOfReports() { return numOfReports; } public final void setNumOfReports(Integer numOfReports) { this.numOfReports = numOfReports; } @Override public final Builder numOfReports(Integer numOfReports) { this.numOfReports = numOfReports; return this; } public final String getTrendField() { return trendField; } public final void setTrendField(String trendField) { this.trendField = trendField; } @Override public final Builder trendField(String trendField) { this.trendField = trendField; return this; } @Override public final Builder trendField(ReportGroupTrendFieldType trendField) { this.trendField(trendField == null ? null : trendField.toString()); return this; } @Override public Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) { super.overrideConfiguration(overrideConfiguration); return this; } @Override public Builder overrideConfiguration(Consumer builderConsumer) { super.overrideConfiguration(builderConsumer); return this; } @Override public GetReportGroupTrendRequest build() { return new GetReportGroupTrendRequest(this); } @Override public List> sdkFields() { return SDK_FIELDS; } @Override public Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy