Copied!

Generated from protobuf message google.apicore.testing.MockRequestBody

  • internal
CloneableInstantiable
Methods
public __construct( $data = NULL)
 

Constructor.

  • param array $data { Optional. Data for populating the Message object.
    @type string $name @type int|string $number @type string[]|\Google\Protobuf\RepeatedField $repeated_field @type \Google\ApiCore\Testing\MockRequestBody $nested_message @type \Google\Protobuf\BytesValue $bytes_value @type \Google\Protobuf\Duration $duration_value @type \Google\Protobuf\FieldMask $field_mask @type \Google\Protobuf\Int64Value $int64_value @type \Google\Protobuf\ListValue $list_value @type \Google\Protobuf\StringValue $string_value @type \Google\Protobuf\Struct $struct_value @type \Google\Protobuf\Timestamp $timestamp_value @type \Google\Protobuf\Value $value_value @type string $field_1 @type string $field_2 @type string $field_3 
    }
public Google\Protobuf\Internal\Message::__debugInfo()
public Google\Protobuf\Internal\Message::byteSize()
 
  • ignore
public Google\Protobuf\Internal\Message::clear()
 

Clear all containing fields.

  • return null
public clearBytesValue()
public clearDurationValue()
public clearFieldMask()
public clearInt64Value()
public clearListValue()
public clearNestedMessage()
public clearStringValue()
public clearStructValue()
public clearTimestampValue()
public clearValueValue()
public Google\Protobuf\Internal\Message::discardUnknownFields()
 

Clear all unknown fields previously parsed.

  • return null
public getBytesValue()
 

Generated from protobuf field .google.protobuf.BytesValue bytes_value = 5;

  • return \Google\Protobuf\BytesValue
public getBytesValueUnwrapped()
 

Returns the unboxed value from getBytesValue()

Generated from protobuf field .google.protobuf.BytesValue bytes_value = 5;

  • return string|null
public getDurationValue()
 

Generated from protobuf field .google.protobuf.Duration duration_value = 6;

  • return \Google\Protobuf\Duration
public getField1()
 

Generated from protobuf field string field_1 = 14;

  • return string
public getField2()
 

Generated from protobuf field string field_2 = 15;

  • return string
public getField3()
 

Generated from protobuf field string field_3 = 16;

  • return string
public getFieldMask()
 

Generated from protobuf field .google.protobuf.FieldMask field_mask = 7;

  • return \Google\Protobuf\FieldMask
public getInt64Value()
 

Generated from protobuf field .google.protobuf.Int64Value int64_value = 8;

  • return \Google\Protobuf\Int64Value
public getInt64ValueUnwrapped()
 

Returns the unboxed value from getInt64Value()

Generated from protobuf field .google.protobuf.Int64Value int64_value = 8;

  • return int|string|null
public getListValue()
 

Generated from protobuf field .google.protobuf.ListValue list_value = 9;

  • return \Google\Protobuf\ListValue
public getName()
 

Generated from protobuf field string name = 1;

  • return string
public getNestedMessage()
 

Generated from protobuf field .google.apicore.testing.MockRequestBody nested_message = 4;

  • return \Google\ApiCore\Testing\MockRequestBody
public getNumber()
 

Generated from protobuf field uint64 number = 2;

  • return int|string
public getOneofField()
 
  • return string
public getRepeatedField()
 

Generated from protobuf field repeated string repeated_field = 3;

  • return \Google\Protobuf\RepeatedField
public getStringValue()
 

Generated from protobuf field .google.protobuf.StringValue string_value = 10;

  • return \Google\Protobuf\StringValue
public getStringValueUnwrapped()
 

Returns the unboxed value from getStringValue()

Generated from protobuf field .google.protobuf.StringValue string_value = 10;

  • return string|null
public getStructValue()
 

Generated from protobuf field .google.protobuf.Struct struct_value = 11;

  • return \Google\Protobuf\Struct
public getTimestampValue()
 

Generated from protobuf field .google.protobuf.Timestamp timestamp_value = 12;

  • return \Google\Protobuf\Timestamp
public getValueValue()
 

Generated from protobuf field .google.protobuf.Value value_value = 13;

  • return \Google\Protobuf\Value
public hasBytesValue()
public hasDurationValue()
public hasField1()
public hasField2()
public hasField3()
public hasFieldMask()
public hasInt64Value()
public hasListValue()
public hasNestedMessage()
public hasStringValue()
public hasStructValue()
public hasTimestampValue()
public hasValueValue()
public Google\Protobuf\Internal\Message::jsonByteSize( $options = 0)
 
  • ignore
public Google\Protobuf\Internal\Message::mergeFrom( $msg)
 

Merges the contents of the specified message into current message.

This method merges the contents of the specified message into the current message. Singular fields that are set in the specified message overwrite the corresponding fields in the current message. Repeated fields are appended. Map fields key-value pairs are overwritten. Singular/Oneof sub-messages are recursively merged. All overwritten sub-messages are deep-copied.

  • param object $msg Protobuf message to be merged from.
  • return null
public Google\Protobuf\Internal\Message::mergeFromJsonString( $data, $ignore_unknown = false)
 

Parses a json string to protobuf message.

This function takes a string in the json wire format, matching the encoding output by serializeToJsonString(). See mergeFrom() for merging behavior, if the field is already set in the specified message.

  • param string $data Json protobuf data.
  • param bool $ignore_unknown
  • return null
  • throws \Exception Invalid data.
public Google\Protobuf\Internal\Message::mergeFromString( $data)
 

Parses a protocol buffer contained in a string.

This function takes a string in the (non-human-readable) binary wire format, matching the encoding output by serializeToString(). See mergeFrom() for merging behavior, if the field is already set in the specified message.

  • param string $data Binary protobuf data.
  • return null
  • throws \Exception Invalid data.
public Google\Protobuf\Internal\Message::parseFromJsonStream( $input, $ignore_unknown)
 
  • ignore
public Google\Protobuf\Internal\Message::parseFromStream( $input)
 
  • ignore
public Google\Protobuf\Internal\Message::serializeToJsonStream( $output)
 
  • ignore
public Google\Protobuf\Internal\Message::serializeToJsonString( $options = 0)
 

Serialize the message to json string.

  • return string Serialized json protobuf data.
public Google\Protobuf\Internal\Message::serializeToStream( $output)
 
  • ignore
public Google\Protobuf\Internal\Message::serializeToString()
 

Serialize the message to string.

  • return string Serialized binary protobuf data.
public setBytesValue( $var)
 

Generated from protobuf field .google.protobuf.BytesValue bytes_value = 5;

  • param \Google\Protobuf\BytesValue $var
  • return $this
public setBytesValueUnwrapped( $var)
 

Sets the field by wrapping a primitive type in a Google\Protobuf\BytesValue object.

Generated from protobuf field .google.protobuf.BytesValue bytes_value = 5;

  • param string|null $var
  • return $this
public setDurationValue( $var)
 

Generated from protobuf field .google.protobuf.Duration duration_value = 6;

  • param \Google\Protobuf\Duration $var
  • return $this
public setField1( $var)
 

Generated from protobuf field string field_1 = 14;

  • param string $var
  • return $this
public setField2( $var)
 

Generated from protobuf field string field_2 = 15;

  • param string $var
  • return $this
public setField3( $var)
 

Generated from protobuf field string field_3 = 16;

  • param string $var
  • return $this
public setFieldMask( $var)
 

Generated from protobuf field .google.protobuf.FieldMask field_mask = 7;

  • param \Google\Protobuf\FieldMask $var
  • return $this
public setInt64Value( $var)
 

Generated from protobuf field .google.protobuf.Int64Value int64_value = 8;

  • param \Google\Protobuf\Int64Value $var
  • return $this
public setInt64ValueUnwrapped( $var)
 

Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object.

Generated from protobuf field .google.protobuf.Int64Value int64_value = 8;

  • param int|string|null $var
  • return $this
public setListValue( $var)
 

Generated from protobuf field .google.protobuf.ListValue list_value = 9;

  • param \Google\Protobuf\ListValue $var
  • return $this
public setName( $var)
 

Generated from protobuf field string name = 1;

  • param string $var
  • return $this
public setNestedMessage( $var)
 

Generated from protobuf field .google.apicore.testing.MockRequestBody nested_message = 4;

  • param \Google\ApiCore\Testing\MockRequestBody $var
  • return $this
public setNumber( $var)
 

Generated from protobuf field uint64 number = 2;

  • param int|string $var
  • return $this
public setRepeatedField( $var)
 

Generated from protobuf field repeated string repeated_field = 3;

  • param string[]|\Google\Protobuf\RepeatedField $var
  • return $this
public setStringValue( $var)
 

Generated from protobuf field .google.protobuf.StringValue string_value = 10;

  • param \Google\Protobuf\StringValue $var
  • return $this
public setStringValueUnwrapped( $var)
 

Sets the field by wrapping a primitive type in a Google\Protobuf\StringValue object.

Generated from protobuf field .google.protobuf.StringValue string_value = 10;

  • param string|null $var
  • return $this
public setStructValue( $var)
 

Generated from protobuf field .google.protobuf.Struct struct_value = 11;

  • param \Google\Protobuf\Struct $var
  • return $this
public setTimestampValue( $var)
 

Generated from protobuf field .google.protobuf.Timestamp timestamp_value = 12;

  • param \Google\Protobuf\Timestamp $var
  • return $this
public setValueValue( $var)
 

Generated from protobuf field .google.protobuf.Value value_value = 13;

  • param \Google\Protobuf\Value $var
  • return $this
Properties
protected $bytes_value = NULL
 

Generated from protobuf field .google.protobuf.BytesValue bytes_value = 5;

protected $duration_value = NULL
 

Generated from protobuf field .google.protobuf.Duration duration_value = 6;

protected $field_mask = NULL
 

Generated from protobuf field .google.protobuf.FieldMask field_mask = 7;

protected $int64_value = NULL
 

Generated from protobuf field .google.protobuf.Int64Value int64_value = 8;

protected $list_value = NULL
 

Generated from protobuf field .google.protobuf.ListValue list_value = 9;

protected $name = ''
 

Generated from protobuf field string name = 1;

protected $nested_message = NULL
 

Generated from protobuf field .google.apicore.testing.MockRequestBody nested_message = 4;

protected $number = 0
 

Generated from protobuf field uint64 number = 2;

protected $oneof_field = NULL
protected $string_value = NULL
 

Generated from protobuf field .google.protobuf.StringValue string_value = 10;

protected $struct_value = NULL
 

Generated from protobuf field .google.protobuf.Struct struct_value = 11;

protected $timestamp_value = NULL
 

Generated from protobuf field .google.protobuf.Timestamp timestamp_value = 12;

protected $value_value = NULL
 

Generated from protobuf field .google.protobuf.Value value_value = 13;

Methods
protected Google\Protobuf\Internal\Message::hasOneof( $number)
protected Google\Protobuf\Internal\Message::mergeFromArray(array $array)
 

Populates the message from a user-supplied PHP array. Array keys correspond to Message properties and nested message properties.

Example:

$message->mergeFromArray([ 'name' => 'This is a message name', 'interval' => [ 'startTime' => time() - 60, 'endTime' => time(), ] ]); 

This method will trigger an error if it is passed data that cannot be converted to the correct type. For example, a StringValue field must receive data that is either a string or a StringValue object.

  • param array $array An array containing message properties and values.
  • return null
protected Google\Protobuf\Internal\Message::mergeFromJsonArray( $array, $ignore_unknown)
protected Google\Protobuf\Internal\Message::readOneof( $number)
protected Google\Protobuf\Internal\Message::readWrapperValue( $member)
protected Google\Protobuf\Internal\Message::whichOneof( $oneof_name)
protected Google\Protobuf\Internal\Message::writeOneof( $number, $value)
protected Google\Protobuf\Internal\Message::writeWrapperValue( $member, $value)
Properties
private $repeated_field = NULL
 

Generated from protobuf field repeated string repeated_field = 3;

© 2025 Bruce Wells