Class SustainabilityProjection (2.26.0)

public final class SustainabilityProjection extends GeneratedMessageV3 implements SustainabilityProjectionOrBuilder

Contains metadata about how much sustainability a recommendation can save or incur.

Protobuf type google.cloud.recommender.v1.SustainabilityProjection

Static Fields

DURATION_FIELD_NUMBER

public static final int DURATION_FIELD_NUMBER
Field Value
TypeDescription
int

KG_C_O2E_FIELD_NUMBER

public static final int KG_C_O2E_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static SustainabilityProjection getDefaultInstance()
Returns
TypeDescription
SustainabilityProjection

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static SustainabilityProjection.Builder newBuilder()
Returns
TypeDescription
SustainabilityProjection.Builder

newBuilder(SustainabilityProjection prototype)

public static SustainabilityProjection.Builder newBuilder(SustainabilityProjection prototype)
Parameter
NameDescription
prototypeSustainabilityProjection
Returns
TypeDescription
SustainabilityProjection.Builder

parseDelimitedFrom(InputStream input)

public static SustainabilityProjection parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
SustainabilityProjection
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static SustainabilityProjection parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SustainabilityProjection
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static SustainabilityProjection parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
SustainabilityProjection
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static SustainabilityProjection parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SustainabilityProjection
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static SustainabilityProjection parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
SustainabilityProjection
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static SustainabilityProjection parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SustainabilityProjection
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static SustainabilityProjection parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
SustainabilityProjection
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static SustainabilityProjection parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SustainabilityProjection
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static SustainabilityProjection parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
SustainabilityProjection
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static SustainabilityProjection parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SustainabilityProjection
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static SustainabilityProjection parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
SustainabilityProjection
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static SustainabilityProjection parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SustainabilityProjection
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<SustainabilityProjection> parser()
Returns
TypeDescription
Parser<SustainabilityProjection>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public SustainabilityProjection getDefaultInstanceForType()
Returns
TypeDescription
SustainabilityProjection

getDuration()

public Duration getDuration()

Duration for which this sustainability applies.

.google.protobuf.Duration duration = 2;

Returns
TypeDescription
Duration

The duration.

getDurationOrBuilder()

public DurationOrBuilder getDurationOrBuilder()

Duration for which this sustainability applies.

.google.protobuf.Duration duration = 2;

Returns
TypeDescription
DurationOrBuilder

getKgCO2E()

public double getKgCO2E()

Carbon Footprint generated in kg of CO2 equivalent. Chose kg_c_o2e so that the name renders correctly in camelCase (kgCO2e).

double kg_c_o2e = 1;

Returns
TypeDescription
double

The kgCO2e.

getParserForType()

public Parser<SustainabilityProjection> getParserForType()
Returns
TypeDescription
Parser<SustainabilityProjection>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

hasDuration()

public boolean hasDuration()

Duration for which this sustainability applies.

.google.protobuf.Duration duration = 2;

Returns
TypeDescription
boolean

Whether the duration field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public SustainabilityProjection.Builder newBuilderForType()
Returns
TypeDescription
SustainabilityProjection.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected SustainabilityProjection.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
SustainabilityProjection.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public SustainabilityProjection.Builder toBuilder()
Returns
TypeDescription
SustainabilityProjection.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException