
com.azure.resourcemanager.devcenter.models.DevCenterProjectCatalogSettings Maven / Gradle / Ivy
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.devcenter.models;
import com.azure.core.annotation.Fluent;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import java.io.IOException;
/**
* Project catalog settings for project catalogs under a project associated to this dev center.
*/
@Fluent
public final class DevCenterProjectCatalogSettings implements JsonSerializable {
/*
* Whether project catalogs associated with projects in this dev center can be configured to sync catalog items.
*/
private CatalogItemSyncEnableStatus catalogItemSyncEnableStatus;
/**
* Creates an instance of DevCenterProjectCatalogSettings class.
*/
public DevCenterProjectCatalogSettings() {
}
/**
* Get the catalogItemSyncEnableStatus property: Whether project catalogs associated with projects in this dev
* center can be configured to sync catalog items.
*
* @return the catalogItemSyncEnableStatus value.
*/
public CatalogItemSyncEnableStatus catalogItemSyncEnableStatus() {
return this.catalogItemSyncEnableStatus;
}
/**
* Set the catalogItemSyncEnableStatus property: Whether project catalogs associated with projects in this dev
* center can be configured to sync catalog items.
*
* @param catalogItemSyncEnableStatus the catalogItemSyncEnableStatus value to set.
* @return the DevCenterProjectCatalogSettings object itself.
*/
public DevCenterProjectCatalogSettings
withCatalogItemSyncEnableStatus(CatalogItemSyncEnableStatus catalogItemSyncEnableStatus) {
this.catalogItemSyncEnableStatus = catalogItemSyncEnableStatus;
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
}
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeStringField("catalogItemSyncEnableStatus",
this.catalogItemSyncEnableStatus == null ? null : this.catalogItemSyncEnableStatus.toString());
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of DevCenterProjectCatalogSettings from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of DevCenterProjectCatalogSettings if the JsonReader was pointing to an instance of it, or
* null if it was pointing to JSON null.
* @throws IOException If an error occurs while reading the DevCenterProjectCatalogSettings.
*/
public static DevCenterProjectCatalogSettings fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
DevCenterProjectCatalogSettings deserializedDevCenterProjectCatalogSettings
= new DevCenterProjectCatalogSettings();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("catalogItemSyncEnableStatus".equals(fieldName)) {
deserializedDevCenterProjectCatalogSettings.catalogItemSyncEnableStatus
= CatalogItemSyncEnableStatus.fromString(reader.getString());
} else {
reader.skipChildren();
}
}
return deserializedDevCenterProjectCatalogSettings;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy