com.azure.resourcemanager.security.models.GcpProjectDetails Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-security Show documentation
Show all versions of azure-resourcemanager-security Show documentation
This package contains Microsoft Azure SDK for Security Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. API spec for Microsoft.Security (Azure Security Center) resource provider. Package tag package-composite-v3.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.security.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;
/**
* The details about the project represented by the security connector.
*/
@Fluent
public final class GcpProjectDetails implements JsonSerializable {
/*
* The unique GCP Project number
*/
private String projectNumber;
/*
* The GCP Project id
*/
private String projectId;
/*
* The GCP workload identity federation pool id
*/
private String workloadIdentityPoolId;
/*
* GCP project name
*/
private String projectName;
/**
* Creates an instance of GcpProjectDetails class.
*/
public GcpProjectDetails() {
}
/**
* Get the projectNumber property: The unique GCP Project number.
*
* @return the projectNumber value.
*/
public String projectNumber() {
return this.projectNumber;
}
/**
* Set the projectNumber property: The unique GCP Project number.
*
* @param projectNumber the projectNumber value to set.
* @return the GcpProjectDetails object itself.
*/
public GcpProjectDetails withProjectNumber(String projectNumber) {
this.projectNumber = projectNumber;
return this;
}
/**
* Get the projectId property: The GCP Project id.
*
* @return the projectId value.
*/
public String projectId() {
return this.projectId;
}
/**
* Set the projectId property: The GCP Project id.
*
* @param projectId the projectId value to set.
* @return the GcpProjectDetails object itself.
*/
public GcpProjectDetails withProjectId(String projectId) {
this.projectId = projectId;
return this;
}
/**
* Get the workloadIdentityPoolId property: The GCP workload identity federation pool id.
*
* @return the workloadIdentityPoolId value.
*/
public String workloadIdentityPoolId() {
return this.workloadIdentityPoolId;
}
/**
* Get the projectName property: GCP project name.
*
* @return the projectName value.
*/
public String projectName() {
return this.projectName;
}
/**
* 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("projectNumber", this.projectNumber);
jsonWriter.writeStringField("projectId", this.projectId);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of GcpProjectDetails from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of GcpProjectDetails 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 GcpProjectDetails.
*/
public static GcpProjectDetails fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
GcpProjectDetails deserializedGcpProjectDetails = new GcpProjectDetails();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("projectNumber".equals(fieldName)) {
deserializedGcpProjectDetails.projectNumber = reader.getString();
} else if ("projectId".equals(fieldName)) {
deserializedGcpProjectDetails.projectId = reader.getString();
} else if ("workloadIdentityPoolId".equals(fieldName)) {
deserializedGcpProjectDetails.workloadIdentityPoolId = reader.getString();
} else if ("projectName".equals(fieldName)) {
deserializedGcpProjectDetails.projectName = reader.getString();
} else {
reader.skipChildren();
}
}
return deserializedGcpProjectDetails;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy