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

com.azure.resourcemanager.mediaservices.models.TrackPropertyCondition Maven / Gradle / Ivy

Go to download

This package contains Microsoft Azure SDK for MediaServices Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. This Swagger was generated by the API Framework. Package tag package-account-2023-01.

There is a newer version: 2.4.0-beta.2
Show newest version
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.mediaservices.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Class to specify one track property condition. */
@Fluent
public final class TrackPropertyCondition {
    /*
     * Track property type
     */
    @JsonProperty(value = "property", required = true)
    private TrackPropertyType property;

    /*
     * Track property condition operation
     */
    @JsonProperty(value = "operation", required = true)
    private TrackPropertyCompareOperation operation;

    /*
     * Track property value
     */
    @JsonProperty(value = "value")
    private String value;

    /**
     * Get the property property: Track property type.
     *
     * @return the property value.
     */
    public TrackPropertyType property() {
        return this.property;
    }

    /**
     * Set the property property: Track property type.
     *
     * @param property the property value to set.
     * @return the TrackPropertyCondition object itself.
     */
    public TrackPropertyCondition withProperty(TrackPropertyType property) {
        this.property = property;
        return this;
    }

    /**
     * Get the operation property: Track property condition operation.
     *
     * @return the operation value.
     */
    public TrackPropertyCompareOperation operation() {
        return this.operation;
    }

    /**
     * Set the operation property: Track property condition operation.
     *
     * @param operation the operation value to set.
     * @return the TrackPropertyCondition object itself.
     */
    public TrackPropertyCondition withOperation(TrackPropertyCompareOperation operation) {
        this.operation = operation;
        return this;
    }

    /**
     * Get the value property: Track property value.
     *
     * @return the value value.
     */
    public String value() {
        return this.value;
    }

    /**
     * Set the value property: Track property value.
     *
     * @param value the value value to set.
     * @return the TrackPropertyCondition object itself.
     */
    public TrackPropertyCondition withValue(String value) {
        this.value = value;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (property() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException("Missing required property property in model TrackPropertyCondition"));
        }
        if (operation() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException(
                        "Missing required property operation in model TrackPropertyCondition"));
        }
    }

    private static final ClientLogger LOGGER = new ClientLogger(TrackPropertyCondition.class);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy