blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
3
264
content_id
stringlengths
40
40
detected_licenses
listlengths
0
85
license_type
stringclasses
2 values
repo_name
stringlengths
5
140
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
986 values
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
3.89k
681M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
23 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
145 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
10.4M
extension
stringclasses
122 values
content
stringlengths
3
10.4M
authors
listlengths
1
1
author_id
stringlengths
0
158
dc1e511661c866dc2039e35bf78c3d052ae80d90
dd18a2b2184b1d9fbe596ede792ef7e7aad70989
/LAB05162017_REGEX/main.cpp
b7a6107308d20373858ab0cf4db7677212f3a12e
[]
no_license
aberry5621/LAB05162017_REGEX
83e48a81905b21188b6f2fbf07b45baa8c986673
cd60e034dc5b7bdcc55a772a35abcb29128b8056
refs/heads/master
2021-01-21T11:30:38.407514
2017-05-18T23:12:11
2017-05-18T23:12:11
91,745,574
0
0
null
null
null
null
UTF-8
C++
false
false
1,427
cpp
// // main.cpp // LAB05162017_REGEX // // Created by ax on 5/18/17. // Copyright © 2017 COMP235. All rights reserved. // #include <regex> #include <string> #include <iostream> int main(int argc, const char * argv[]) { std::cout << "REGEX!\n"; std::string s1 ("20 watermelons, 11 oranges\n"); std::regex e1 ("\\b11\\b"); // matches number 11 inside word blocks // using string/c-string (3) version: std::cout << std::regex_replace (s1,e1,"ZED"); std::string s2 ("20 watermelons, 11 oranges\n"); std::regex e2 ("\\bwater"); // matches character sequence "water" preceded by word block // using string/c-string (3) version: std::cout << std::regex_replace (s2,e2,""); std::string s3 = R"(html = "<div id="slider" class="container"></div>")"; std::regex e3 ("slider"); // matches text "slider: // using string/c-string (3) version: std::cout << std::regex_replace (s3,e3,"slideshow"); std::string s4a ("20201 K Street, Washington, DC"); std::string s4b ("94920 B Street, San Rafael, CA"); std::regex e4 ("\d\d\d\d\d"); // matches 5 number sequences std::cout << std::endl; // using string/c-string (3) version: std::cout << "Found sequence at: " << std::regex_search (s4a,e4) << std::endl; std::cout << "Found sequence at: " << std::regex_search (s4b,e4) << std::endl; return 0; }
[ "aberry5621@gmail.com" ]
aberry5621@gmail.com
23aa664e85159dc46fad8132cb9569d0236db270
7645cae39f04f305530c3d2eb1c011cebfb832fb
/DungeonGenerator/Base/test.h
88c99f11d2304fc118edd19b9e9540939e1e0a95
[]
no_license
rittakos/DungeonGenerator
25875c17831afebbb617985b21582acd8a865083
c84e983a4d9468bc8befc421bdb1362a12ac020d
refs/heads/main
2023-08-24T03:06:31.071120
2023-08-11T17:08:21
2023-08-11T17:08:21
533,441,754
0
0
null
null
null
null
UTF-8
C++
false
false
152
h
#pragma once #include "log.h" namespace Test { static void Expect_True(bool expression) { expression ? Log::info("OK") : Log::error("ERROR"); } }
[ "akos.rittgasszer@gmail.com" ]
akos.rittgasszer@gmail.com
98793f6483b44bc1dc597bae5c1ba718c7aa3054
40150c4e4199bca594fb21bded192bbc05f8c835
/build/iOS/Preview/include/Uno.Bool.h
98f3e9538424b4a52242a82d79b121cb8da2dbb7
[]
no_license
thegreatyuke42/fuse-test
af0a863ab8cdc19919da11de5f3416cc81fc975f
b7e12f21d12a35d21a394703ff2040a4f3a35e00
refs/heads/master
2016-09-12T10:39:37.656900
2016-05-20T20:13:31
2016-05-20T20:13:31
58,671,009
0
0
null
null
null
null
UTF-8
C++
false
false
1,089
h
// This file was generated based on '/usr/local/share/uno/Packages/UnoCore/0.27.20/Source/Uno/$.uno#7'. // WARNING: Changes might be lost if you edit this file directly. #pragma once #include <Uno.Object.h> namespace g{ namespace Uno{ // public intrinsic struct Bool :266 // { uStructType* Bool_typeof(); void Bool__Equals_fn(bool* __this, uType* __type, uObject* o, bool* __retval); void Bool__GetHashCode_fn(bool* __this, uType* __type, int* __retval); void Bool__Parse_fn(uString* str, bool* __retval); void Bool__ToString_fn(bool* __this, uType* __type, uString** __retval); struct Bool { static bool Equals(bool __this, uType* __type, uObject* o) { bool __retval; return Bool__Equals_fn(&__this, __type, o, &__retval), __retval; } static int GetHashCode(bool __this, uType* __type) { int __retval; return Bool__GetHashCode_fn(&__this, __type, &__retval), __retval; } static uString* ToString(bool __this, uType* __type) { uString* __retval; return Bool__ToString_fn(&__this, __type, &__retval), __retval; } static bool Parse(uString* str); }; // } }} // ::g::Uno
[ "johnrbennett3@gmail.com" ]
johnrbennett3@gmail.com
528036a5e0acbd114ab2d6f6ef900009860b8669
def9a422091bd0850c0732764c340ef6065997ec
/SunriseClockLCD_exp/SunriseClockLCD_exp.ino
8e265f4171ae43f5aee7d7582165abba61af1d98
[]
no_license
NeuralBlade/ArduinoProjects
eb2cf3bb5fdf73ac2202051cc2fa0590fe827acf
3287208b82424d32e728128fb6d81fcad9ca26fd
refs/heads/master
2016-09-05T09:58:35.546943
2013-08-01T21:35:41
2013-08-01T21:35:41
null
0
0
null
null
null
null
UTF-8
C++
false
false
13,592
ino
#define TEST_MODE //#include <LiquidCrystal_8x2.h> #include <LiquidCrystal.h> #define BUTTON_PIN A1 #define ERROR_WINDOW 75 // +/- this value, for button input #define BUTTONDELAY 20 #define NOISE_THRESHOLD 6 #define SECONDS_BUFFER 60 #define SAMPLE_TIME 100 #define AUDIO_TRIGGER_VAL 30 #define MIN_SAMPLE_SIZE 10 * (1000/SAMPLE_TIME) #define MODE_OFF 0 #define MODE_WAKING 1 #define MODE_ON 2 #define MODE_SLEEP 3 #define MODE_IGNORE_TRIGGER_DELAY 4 #define MODE_IGNORE_TRIGGER 5 #define STRIP1_PIN 5 #define STRIP2_PIN 10 #define STRIP3_PIN 11 #define LIGHT_PIN A0 #define SWITCH_PIN A1 #define AUDIO_PIN A2 #define POT_PIN A3 /*byte brightness_1[256]={ 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4, 4,4,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,7,7,7,7,7,7,8,8,8,8,8,8,9,9,9,9,10,10,10,10,10,11,11,11,11,12,12,12,13,13,13,13,14,14,14,15,15,15,16,16,16,17,17,18,18,18,19,19,20,20,20,21,21,22,22,23,23, 24,24,25,26,26,27,27,28,29,29,30,31,31,32,33,33,34,35,36,36,37,38,39,40,41,42,42,43,44,45,46,47,48,50,51,52,53,54,55,57,58,59,60,62,63,64,66,67,69,70,72,74,75,77,79,80,82,84,86,88,90,91,94, 96,98,100,102,104,107,109,111,114,116,119,122,124,127,130,133,136,139,142,145,148,151,155,158,161,165,169,172,176,180,184,188,192,196,201,205,210,214,219,224,229,234,239,244,250,255}; /**/ int br_100[100]; //#define MAX_COUNTER 768 #define MAX_COUNTER 100 int brightnessEXP = 0; #ifdef TEST_MODE unsigned long DELAY_TOTAL_TIME = 2; //minutes unsigned long DELAY_ENABLE_TIME = 5; //in seconds //unsigned int ledBrightnessDelay = 0;//(DELAY_TOTAL_TIME*60*1000)/MAX_COUNTER; //in miliseconds unsigned int mode = 1; #else unsigned long DELAY_TOTAL_TIME = 30; //minutes unsigned long DELAY_ENABLE_TIME = 2.5*60*60; //in seconds unsigned int mode = 0; #endif unsigned long ledBrightnessDelay = 0;//(DELAY_TOTAL_TIME*60*1000)/MAX_COUNTER; //in miliseconds unsigned int inputThresholdLevel = 15; unsigned int inputThresholdTime = 20; //in seconds unsigned long maxAudio = 0; unsigned int str1 = 0; unsigned int str2 = 0; unsigned int str3 = 0; unsigned long count = 0; unsigned long timeElapsed = 0; unsigned int lightValue = 0; int audioValue = 0; unsigned int potValue = 0; unsigned int switchValue= 0; unsigned long buttonLastChecked = 0; unsigned long lastButtonPressedTime = 0; int audioHistory[SECONDS_BUFFER*(1000/SAMPLE_TIME)]; unsigned int audioHistoryPointer = 0; unsigned long lastAudioSampleTime = 0; //8 bit: RS, RW, EN, , D4, D5, D6, D7 //RS-->PC0 //RW-->PC1 //EN-->PC2 LiquidCrystal lcd(2,3,4,13,12,8,7); /***************************************** * Filtering Code Starts Here * ******************************************/ void wait_for_tick(void) { unsigned long timestamp = millis(); while(millis() == timestamp); } void wait_for_five_ticks(void) { wait_for_tick(); wait_for_tick(); wait_for_tick(); wait_for_tick(); wait_for_tick(); } int readAnalog(int sensorPin){ int total; // Filter out any 50 Hz hum by using a 4-point moving average // Each sample takes about 0.1ms, so we have to wait a relatively // long a while between samples. wait_for_tick(); total = analogRead(sensorPin); wait_for_five_ticks(); total += analogRead(sensorPin); wait_for_five_ticks(); total += analogRead(sensorPin); wait_for_five_ticks(); total += analogRead(sensorPin); total /= 4; return total; } /***************************************** * Filtering Code Ends Here * ******************************************/ /***************************************** * Multi Button Code Starts Here * ******************************************/ int usedVal = 0; int buttonPushed(int pinNum) { int val = 0; // variable to store the read value digitalWrite((14+pinNum), HIGH); // enable the 20k internal pullup val = analogRead(pinNum); // read the input pin // we don't use the upper position because that is the same as the // all-open switch value when the internal 20K ohm pullup is enabled. //if( val >= 923 and val <= 1023 ) if ( val >= (400-ERROR_WINDOW) and val <= (400+ERROR_WINDOW) ) { // 430 return 2; } else if ( val >= (200-ERROR_WINDOW) and val <= (200+ERROR_WINDOW) ) { // 230 return 1; } else{ return 0; // no button found to have been pushed } } /***************************************** * Multi Button Code Ends Here * ******************************************/ int onModeBrightness = 0; void setup(){ ledBrightnessDelay = (DELAY_TOTAL_TIME*60*1000)/MAX_COUNTER; //in miliseconds #ifdef TEST_MODE Serial.begin(9600); Serial.write(""); Serial.write(""); #endif if(MAX_COUNTER == 768){ brightnessEXP = 115.595; } else{ brightnessEXP = 46; } for(int i = 0; i < 255; i++){ delay(10); adjustLed(6, i); //sets medium intensity for LCD } float adjVal = 1; br_100[0] = 0; for(int i = i; i < 100;i++){ br_100[i] = round(adjVal); adjVal *= 1.06941; } lcd.begin(8,2); lcd.clear(); #ifdef TEST_MODE lcd.print("TESTMODE"); lcd.setCursor(0,1); lcd.print("ENABLED"); mode=1; #elif lcd.print("Starting"); lcd.setCursor(0,1); lcd.print(" v0.1"); #endif delay(1000); lcd.clear(); lcd.print(DELAY_TOTAL_TIME); lcd.print(" "); lcd.print(MAX_COUNTER); lcd.setCursor(0,1); lcd.print(DELAY_TOTAL_TIME*60*1000); delay(3000); lcd.clear(); lcd.print(ledBrightnessDelay); delay(3000); lcd.clear(); onModeBrightness = readAnalog(POT_PIN); initMode(mode); } int lastButtonPressed = 0; int readAudioPin(){ int readAudioValue = analogRead(AUDIO_PIN); readAudioValue = abs(readAudioValue-512)-NOISE_THRESHOLD; if(readAudioValue < 0) readAudioValue = 0; if(readAudioValue > 250) readAudioValue = 250; return readAudioValue; } int inputOff = 0; int lastRef = 0; void loop(){ int inputPin = POT_PIN; int newReading = analogRead(inputPin); int diff = (newReading -lastRef); if(abs(diff) < NOISE_THRESHOLD){ //input changing too much, cant use it if(diff != 0){ diff=diff/4; adjustLed(STRIP1_PIN, str1+diff); adjustLed(STRIP2_PIN, str2+diff); adjustLed(STRIP3_PIN, str3+diff); } } lastRef = newReading; /**/ potValue = analogRead(POT_PIN); lightValue = analogRead(LIGHT_PIN); // potValue = readAnalog(POT_PIN); // lightValue = readAnalog(LIGHT_PIN); // adjustLed(6, (potValue-(lightValue/3))/4); // need to work on adjusting LCD brightness when its dark adjustLed(6, map(potValue,0,1024,0,256)); // need to work on adjusting LCD brightness when its dark if(mode == MODE_ON){ adjustLed(STRIP1_PIN, str1); adjustLed(STRIP2_PIN, str2); adjustLed(STRIP3_PIN, str3); if(abs(potValue-onModeBrightness) > NOISE_THRESHOLD ){ onModeBrightness = potValue; count = potValue * 0.7470703125; setBrightness(count); if(count > MAX_COUNTER){ initMode(MODE_ON); } /** * if(count < 255) { * str1 = count; * str2=0; * str3=0; * } * else if(count < 510){ * str1=255; * str2=count-255; * str3=0; * } * else if(count < 765){ * str1=255; * str2=255; * str3=count-510; * } * else { * str1=255; * str2=255; * str3=255; * mode=MODE_ON; * count = 0; }/**/ } } else if(mode == MODE_OFF){ if( (millis() - lastAudioSampleTime) > SAMPLE_TIME){ setBrightness(0); audioHistory[audioHistoryPointer ++] = readAudioPin(); if(audioHistoryPointer > (SECONDS_BUFFER*(1000/SAMPLE_TIME))) audioHistoryPointer = 0; unsigned long averageLevel = 0; unsigned int levelCount = 0; for (int i = 0; i < SECONDS_BUFFER*(1000/SAMPLE_TIME); i++) { int value = audioHistory[i]; if(value > 0){ averageLevel += value; levelCount ++; } } averageLevel = averageLevel / (1000/SAMPLE_TIME); maxAudio=averageLevel; lastAudioSampleTime = millis(); count = levelCount; if(averageLevel >= AUDIO_TRIGGER_VAL && levelCount >= MIN_SAMPLE_SIZE){ initMode(MODE_WAKING); } } } else if(mode == MODE_WAKING){ // debug(); if(abs(millis () - timeElapsed) > ledBrightnessDelay){ timeElapsed = millis(); setBrightness(count++); if(count > MAX_COUNTER) initMode(MODE_ON); } } else if(mode == MODE_SLEEP){ if(abs(millis () - timeElapsed) > ledBrightnessDelay){ timeElapsed = millis(); count--; if(count <= 0){ initMode(MODE_IGNORE_TRIGGER_DELAY); } else { setBrightness(count); } } } else if(mode == MODE_IGNORE_TRIGGER_DELAY){ setBrightness(0); count = (DELAY_ENABLE_TIME -(abs(millis () - timeElapsed)/1000) ) ; if((abs(millis () - timeElapsed)/1000) > DELAY_ENABLE_TIME){ initMode(MODE_OFF); } } /**/ //******************* Check if buttons were pressed if( buttonLastChecked == 0 ) // see if this is the first time checking the buttons buttonLastChecked = millis()+BUTTONDELAY; // force a check this cycle if( millis() - buttonLastChecked > BUTTONDELAY ) { // make sure a reasonable delay passed if( int buttNum = buttonPushed(BUTTON_PIN) ) { if(lastButtonPressed != buttNum){ lastButtonPressed = buttNum; lastButtonPressedTime = millis(); } } else { if(lastButtonPressed){ unsigned long buttonPressedTime = millis()/lastButtonPressedTime; buttonHandler(lastButtonPressed,buttonPressedTime); } lastButtonPressed = 0; } // if(lastButtonPressed != 0){ buttonLastChecked = millis(); // reset the lastChecked value } //******************* END Check if buttons were pressed updateDisplay(); } int prevBrightness =0; int prevStr1 = 0; int prevStr2 = 0; int prevStr3 = 0; void setBrightness(int brightness){ lcd.clear(); lcd.print(brightness); lcd.print(" "); lcd.print(br_100[brightness]); if(brightness > MAX_COUNTER){ brightness = MAX_COUNTER; } if(brightness == 0 || brightness < 0){ adjustLed(STRIP1_PIN, 0); adjustLed(STRIP2_PIN, 0); adjustLed(STRIP3_PIN, 0); } else { // int newBrightness=brightness_1[brightness/3]; int newBrightness=br_100[brightness]/3; int scale = brightness % 3; if(newBrightness < 25){ str1 = newBrightness; str2 = newBrightness; str3 = newBrightness; } else { str1=str2=str3=newBrightness; if(scale == 0) { str2=str3=newBrightness-1; } else if (scale == 1){ str3=newBrightness-1; } } prevBrightness = newBrightness; #ifdef TEST_MODE Serial.print(millis()); Serial.print(","); Serial.print(brightness); Serial.print(","); Serial.print(str1); Serial.print(","); Serial.print(str2); Serial.print(","); Serial.print(str3); Serial.print(","); Serial.print(str3); Serial.print(","); Serial.println(readAnalog(LIGHT_PIN)); #endif adjustLed(STRIP1_PIN, str1); adjustLed(STRIP2_PIN, str2); adjustLed(STRIP3_PIN, str3); } #ifdef TEST_MODE delay(750); #endif } void initMode(int newMode){ for (int i = 0; i < SECONDS_BUFFER*(1000/SAMPLE_TIME); i++) { audioHistory[i] = 0; } if(newMode == MODE_OFF){ setBrightness(0); } else if(newMode == MODE_WAKING){ //timeElapsed = millis(); count = 0; } else if(newMode == MODE_ON){ setBrightness(MAX_COUNTER); } else if(newMode == MODE_SLEEP){ count = MAX_COUNTER; } else if(newMode == MODE_IGNORE_TRIGGER_DELAY){ str1=0; str2=0; str3=0; //timeElapsed = millis(); } else if(newMode == MODE_IGNORE_TRIGGER){ } timeElapsed = millis(); mode = newMode; } void buttonHandler(unsigned int button, unsigned long timeHeld){ if(button == 1){ if(mode == MODE_OFF){ initMode(MODE_ON); } else if(mode == MODE_ON){ initMode(MODE_SLEEP); } else if(mode == MODE_SLEEP){ initMode(MODE_IGNORE_TRIGGER_DELAY); } else if(mode == MODE_IGNORE_TRIGGER_DELAY){ initMode(MODE_ON); } } if(button == 2){ if(mode == MODE_ON){ initMode(MODE_OFF); } } } void adjustLed(int pin,int value){ if(value > 255) value = 255; if(value < 0) value = 0; analogWrite(pin,value); } unsigned long lastUpdated = 0; void updateDisplay(){ if(abs(millis()-lastUpdated) > 333){ unsigned int time_in_mode = (millis() - timeElapsed) / 1000 / 60; //time in seconds) lcd.clear(); //lcd.print(maxAudio); lcd.print(str1); lcd.print( " " ); //lcd.print(count); lcd.print(str2); lcd.print( " " ); lcd.print(lightValue/100-1); lcd.setCursor(0,1); lcd.print("M"); lcd.print(mode); lcd.print(" "); lcd.print(usedVal); lcd.print(" "); /* if(time_in_mode < 100) { lcd.print(time_in_mode); } else { lcd.print(time_in_mode/60); }/**/ lcd.print(count); //lcd.print(lightValue); maxAudio = 0; lastUpdated = millis(); } }
[ "johann.muller@johannm-nb.interfront.local" ]
johann.muller@johannm-nb.interfront.local
d59adccc740591eabed0028b7678d91829c66411
267da1cd4c2f09cfab1ae5f64da2305af1ed44ff
/OOP3200-F2020-Lesson3c/Mathf.cpp
c045ab4da8279efe3d5ef18508f144097bce861b
[]
no_license
YiuWingLau/OOP3200-F2020-ICE6
401ab5143de6cd857d2baeff61fec348e5f52212
826c5080ca6e2130e8be53ba73ef9c4841785910
refs/heads/master
2022-12-31T23:01:43.229675
2020-10-24T03:29:09
2020-10-24T03:29:09
306,794,766
0
0
null
null
null
null
UTF-8
C++
false
false
5,724
cpp
#include "Mathf.h" #include <limits> // math constants const float Mathf::Epsilon = 0.00001f; const float Mathf::EpsilonNormalSqrt = 1e-15f; const float Mathf::PI = 3.141593f; const float Mathf::Infinity = std::numeric_limits<float>::infinity(); const float Mathf::NegativeInfinity = -std::numeric_limits<float>::infinity(); const float Mathf::Deg2Rad = 0.01745329f; const float Mathf::Rad2Deg = 57.29578f; float Mathf::Sin(const float f) { return static_cast<float>(sin(static_cast<double>(f))); } float Mathf::Cos(const float f) { return static_cast<float>(cos(static_cast<double>(f))); } float Mathf::Tan(const float f) { return static_cast<float>(tan(static_cast<double>(f))); } float Mathf::Asin(const float f) { return static_cast<float>(asin(static_cast<double>(f))); } float Mathf::Acos(const float f) { return static_cast<float>(acos(static_cast<double>(f))); } float Mathf::Atan(const float f) { return static_cast<float>(atan(static_cast<double>(f))); } float Mathf::Atan2(const float y, const float x) { return static_cast<float>(atan2(static_cast<double>(y), static_cast<double>(x))); } float Mathf::Sqrt(const float f) { return static_cast<float>(sqrt(static_cast<double>(f))); } float Mathf::Abs(const float f) { return abs(f); } int Mathf::Abs(int value) { return abs(value); } float Mathf::Min(const float a, const float b) { if (static_cast<double>(a) < static_cast<double>(b)) { return a; } return b; } int Mathf::Min(const int a, const int b) { if (a < b) { return a; } return b; } float Mathf::Max(const float a, const float b) { if (static_cast<double>(a) > static_cast<double>(b)) { return a; } return b; } int Mathf::Max(const int a, const int b) { if (a > b) { return a; } return b; } float Mathf::Pow(const float f, const float p) { return static_cast<float>(pow(static_cast<double>(f), static_cast<double>(p))); } float Mathf::Exp(const float power) { return static_cast<float>(exp(static_cast<double>(power))); } float Mathf::Log(const float f) { return static_cast<float>(log(static_cast<double>(f))); } float Mathf::Log10(const float f) { return static_cast<float>(log10(static_cast<double>(f))); } float Mathf::Ceil(const float f) { return static_cast<float>(ceil(static_cast<double>(f))); } float Mathf::Floor(const float f) { return static_cast<float>(floor(static_cast<double>(f))); } float Mathf::Round(const float f) { return static_cast<float>(round(static_cast<double>(f))); } int Mathf::CeilToInt(const float f) { return static_cast<int>(ceil(static_cast<double>(f))); } int Mathf::FloorToInt(const float f) { return static_cast<int>(floor(static_cast<double>(f))); } int Mathf::RoundToInt(const float f) { return static_cast<int>(round(static_cast<double>(f))); } float Mathf::Sign(const float f) { return static_cast<double>(f) >= 0.0 ? 1.0f : -1.0f; } float Mathf::Clamp(float value, const float min, const float max) { if (static_cast<double>(value) < static_cast<double>(min)) { value = min; } else if (static_cast<double>(value) > static_cast<double>(max)) { value = max; } return value; } int Mathf::Clamp(int value, const int min, const int max) { if (value < min) { value = min; } else if (value > max) { value = max; } return value; } float Mathf::Clamp01(const float value) { if (static_cast<double>(value) < 0.0) { return 0.0f; } if (static_cast<double>(value) > 1.0) { return 1.0f; } return value; } float Mathf::Lerp(const float a, const float b, const float t) { return a + (b - a) * Mathf::Clamp01(t); } float Mathf::LerpUnclamped(const float a, const float b, const float t) { return a + (b - a) * t; } float Mathf::LerpAngle(const float a, const float b, const float t) { float num = Mathf::Repeat(b - a, 360.0f); if (static_cast<double>(num) > 180.0) { num -= 360.0f; } return a + num * Mathf::Clamp01(t); } float Mathf::MoveTowards(const float current, const float target, const float max_delta) { if (static_cast<double>(Mathf::Abs(target - current)) <= static_cast<double>(max_delta)) { return target; } return current + Mathf::Sign(target - current) * max_delta; } float Mathf::MoveTowardsAngle(const float current, float target, const float max_delta) { target = current + Mathf::DeltaAngle(current, target); return Mathf::MoveTowards(current, target, max_delta); } float Mathf::SmoothStep(const float from, const float to, float t) { t = Mathf::Clamp01(t); t = static_cast<float>(-2.0 * static_cast<double>(t) * static_cast<double>(t) * static_cast<double>(t) + 3.0 * static_cast<double>(t) * static_cast<double>(t)); return static_cast<float>(static_cast<double>(to) * static_cast<double>(t) + static_cast<double>(from) * (1.0 - static_cast<double>(t))); } bool Mathf::Approximately(const float a, const float b) { return static_cast<double>(Mathf::Abs(b - a)) < static_cast<double>(Mathf::Max(1E-06f * Mathf::Max(Mathf::Abs(a), Mathf::Abs(b)), Mathf::Epsilon * 8.0f)); } float Mathf::Repeat(const float t, const float length) { return t - Mathf::Floor(t / length) * length; } float Mathf::PingPong(float t, const float length) { t = Mathf::Repeat(t, length * 2.0f); return length - Mathf::Abs(t - length); } float Mathf::InverseLerp(const float a, const float b, const float value) { if (static_cast<double>(a) != static_cast<double>(b)) { return Mathf::Clamp01(static_cast<float>((static_cast<double>(value) - static_cast<double>(a)) / (static_cast<double>(b) - static_cast< double>(a)))); } return 0.0f; } float Mathf::DeltaAngle(const float current, const float target) { float num = Mathf::Repeat(target - current, 360.0f); if (static_cast<double>(num) > 180.0) { num -= 360.0f; } return num; }
[ "smartsonlau1997@gmail.com" ]
smartsonlau1997@gmail.com
38cf0570c9e7fe0df16db443a9a8ffefab343956
a77fcccb2e46f06842daab98f1057209fe506b18
/BackJoonOnline/14502연구소.cpp
5eb3ca2d4ad582d805a5e5475a55cd94ee2bbe8b
[]
no_license
gan-ta/Algorithm
0c55344a6eb8038c9247485a50bc6324e4ef4c3e
80313278e6e8461891519fd556a65998939bc564
refs/heads/master
2023-05-27T17:03:28.236320
2021-06-14T18:48:35
2021-06-14T18:48:35
257,796,909
0
0
null
null
null
null
UTF-8
C++
false
false
1,791
cpp
#include <cstdio> #include <cmath> #include <vector> #include <queue> using namespace std; typedef struct room { int r; int c; }room; int map[10][10]; int temp_map[10][10]; int n, m; int dr[4] = { 0,1,0,-1 }; int dc[4] = { 1,0,-1,0 }; void map_copy() { int i, j; for (i = 0; i < n; i++) { for (j = 0; j < m; j++) { temp_map[i][j] = map[i][j]; } } } int bfs() { int i,j; int nr, nc; int res= 0; queue<room> q; for (i = 0; i < n; i++) { for (j = 0; j < m; j++) { if (temp_map[i][j] == 2) { q.push({ i,j }); } } } while (!q.empty()) { room search = q.front(); q.pop(); for (i = 0; i < 4; i++) { nr = search.r + dr[i]; nc = search.c + dc[i]; if (nr >= 0 && nr < n && nc >= 0 && nc < m) { if (temp_map[nr][nc] == 0) { q.push({ nr,nc }); temp_map[nr][nc] = 2; } } } } for (i = 0; i < n; i++) { for (j = 0; j < m; j++) { if (temp_map[i][j] == 0) { res++; } } } return res; } int main() { vector<room> room_list; vector<int> idx; int i, j,k; int temp_ans; int ans = -1; scanf("%d %d", &n,&m); for (i = 0; i < n; i++) { for (j = 0; j < m ;j++) { scanf("%d", &map[i][j]); if (map[i][j] == 0) { room_list.push_back({ i,j }); } } } for (i = 0; i < room_list.size()-2; i++) { for (j = i + 1; j < room_list.size() - 1; j++) { for (k = j + 1; k < room_list.size(); k++) { room room1,room2,room3; room1 = room_list[i]; room2 = room_list[j]; room3 = room_list[k]; map_copy(); temp_map[room1.r][room1.c] = 1; temp_map[room2.r][room2.c] = 1; temp_map[room3.r][room3.c] = 1; temp_ans = bfs(); if (ans < temp_ans) { ans = temp_ans; } } } } printf("%d\n", ans); return 0; }
[ "gilmat@naver.com" ]
gilmat@naver.com
a6de80d6d5258d8fc8446af7c7c642bd2d3f185f
16787b46eab84156c0e41c9f17214335010f378a
/include/p2p/Common/Exceptions.h
476b82da316f0f550d0931329378adca5c0857c6
[]
no_license
SmnTin/p2p_msg
7a5fb2bc285e92edebc5de2d55f8792a99d951b3
61f04297865b718ae3f401f46623c58c09a10bdb
refs/heads/master
2021-05-18T20:37:30.835359
2020-07-13T12:45:30
2020-07-13T12:45:30
251,408,482
2
0
null
null
null
null
UTF-8
C++
false
false
355
h
#ifndef P2P_MSG_COMMON_EXCEPTIONS_H #define P2P_MSG_COMMON_EXCEPTIONS_H #include "p2p/p2pException.h" #include "p2p/p2pAssert.h" namespace p2p { class NotImplementedException : public std::logic_error { public: NotImplementedException() : logic_error("Not implemented.") {} }; } #endif //P2P_MSG_COMMON_EXCEPTIONS_H
[ "smn.pankv@gmail.com" ]
smn.pankv@gmail.com
e54cb5d3e69c205e40eb91ba5755b910f2b56468
1183e181e1e5e64fa10c653076936d6fcac59fd6
/vol-400/492 Pig-Latin.cpp
fa6604e4c7946fb7fdfce9a4e5e2ff3b69c4db8a
[]
no_license
ashahrior/UVA-mysolutions
2ce0b52a512e035c7c1f8dd493720307de508ff7
71893f76838058901357e108f47a30bf87e84b6a
refs/heads/master
2020-08-06T02:39:17.799172
2019-10-07T05:21:05
2019-10-07T05:21:05
212,803,021
0
0
null
null
null
null
UTF-8
C++
false
false
1,436
cpp
#include<bits/stdc++.h> using namespace std; int main() { int sz, i, j, x, sym, consonant, vowel; string str; char listt[]= {'a', 'A', 'e', 'E', 'i', 'I', 'o', 'O', 'u', 'U' }; while(getline(cin,str)) { sz = str.size(); for(i=0; i<sz; i++) { if( (str[i]<65) || (str[i]>90) && (str[i]<97) || (str[i]>122) ) { cout<<str[i]; continue; } consonant = 1, vowel = 0; for(j=0; j<10; j++) { if(str[i]==listt[j]) { vowel=1; consonant=0; break; } } if(consonant) { x=i; while( (str[x+1]>='a' && str[x+1]<='z') || (str[x+1]>='A' && str[x+1]<='Z') ) { cout<<str[x+1]; x++; } cout<<str[i]<<"ay"; i=x; sym=0; } else if(vowel) { x=i; while( (str[x]>='a' && str[x]<='z') || (str[x]>='A' && str[x]<='Z') ) { cout<<str[x]; x++; } cout<<"ay"; i=x-1; sym=0; } } cout<<endl; } return 0; }
[ "ashahrior.cse.mbstu@gmail.com" ]
ashahrior.cse.mbstu@gmail.com
a058337ee96569ea67870b66876a25f112cd55bd
49233932a9506c72854dd9a058104c0816f62bda
/colorful_field.cpp
bdded1b2d1fb7935566d1b93bc67672f480fdacd
[]
no_license
vcode11/codeforces-solutions
559e10e5d25d5a606e1573b038f32edf9dffa473
88bf90287471d772a34bde6ae6eaa7e2a9cdc019
refs/heads/master
2020-07-20T14:12:10.567084
2019-09-05T21:04:48
2019-09-05T21:04:48
206,656,602
1
1
null
null
null
null
UTF-8
C++
false
false
598
cpp
#include <bits/stdc++.h> typedef long long ll; #define mod 1000000007 #define pb push_back #define mp(a,b) make_pair(a,b) #define pii pair<int,int> #define pll pair<ll,ll> #define vll vector <ll> #define vii vector <int> #define vpii vector <pii> #define vpll vector <pll> #define ff first #define ss second #define matrix vector <vll> #define all(v) v.begin(),v.end() #define PQ priority_queue using namespace std; int main() { //ios::sync_with_stdio(0); //cin.tie(0); int n, m, k, t; set <pii> st; for(int i = 0; i < k; i++){ int x,y; cin >> x >> y; st.insert({x,y}); } return 0; }
[ "vishalm434@gmail.com" ]
vishalm434@gmail.com
075278375aac7f8586363ea8e76a6b69b8262e03
22212b6400346c5ec3f5927703ad912566d3474f
/src/Plugins/GOAPPlugin/Tasks/TaskAnimatablePlayWait.h
899c3e90a22bb4745bbf4d66c3a2b13a5c9d3d85
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
irov/Mengine
673a9f35ab10ac93d42301bc34514a852c0f150d
8118e4a4a066ffba82bda1f668c1e7a528b6b717
refs/heads/master
2023-09-04T03:19:23.686213
2023-09-03T16:05:24
2023-09-03T16:05:24
41,422,567
46
17
MIT
2022-09-26T18:41:33
2015-08-26T11:44:35
C++
UTF-8
C++
false
false
1,167
h
#pragma once #include "GOAP/TaskInterface.h" #include "Interface/EventReceiverInterface.h" #include "Interface/DocumentInterface.h" #include "Kernel/Animatable.h" #include "Kernel/Eventable.h" namespace Mengine { class TaskAnimatablePlayWait : public GOAP::TaskInterface { public: TaskAnimatablePlayWait( GOAP::Allocator * _allocator, const AnimatablePtr & _animatable, const EventablePtr & _eventable, const DocumentInterfacePtr & _doc ); ~TaskAnimatablePlayWait() override; protected: bool _onRun( GOAP::NodeInterface * _node ) override; bool _onSkipable() const override; void _onSkip() override; void _onFinally() override; protected: AnimatablePtr m_animatable; EventablePtr m_eventable; #if defined(MENGINE_DOCUMENT_ENABLE) DocumentInterfacePtr m_doc; #endif EventReceiverInterfacePtr m_receiver; }; ////////////////////////////////////////////////////////////////////////// typedef GOAP::IntrusivePtr<TaskAnimatablePlayWait> TaskAnimatablePlayWaitPtr; ////////////////////////////////////////////////////////////////////////// }
[ "irov13@mail.ru" ]
irov13@mail.ru
a5bc8fd5cc25d69fe1fff02af3d2c0ca459029e6
2e2f3d00b3011a6f8362dc33adcac75a2b327e40
/Minimum Size Subarray Sum (Two Pointers)/Minimum Size Subarray Sum (Two Pointers)/main.cpp
bb1f13e81fdf98c2326cb9a3ca74d6d68e8de370
[]
no_license
siddhantttt/algorithms-ds-leetcode
52784740387ce17a52702d1f3e26012cc14bdb4b
a23ebdb7b6397db1040059b3b10c59143c9f5281
refs/heads/master
2020-05-16T06:44:47.817931
2019-05-05T10:44:44
2019-05-05T10:44:44
182,855,796
0
0
null
null
null
null
UTF-8
C++
false
false
802
cpp
//Problem: https://leetcode.com/problems/minimum-size-subarray-sum/ //Implementation: This is a O(N) implentation //Extremely Important Problem #include <vector> #include <iostream> #include <stack> #include <queue> #include <string> #include <map> using namespace std; class Solution { public: int minSubArrayLen(int s, vector<int>& nums) { int minLen = INT_MAX, left = 0, sum = 0; for (int right = 0; right < nums.size(); right++){ sum += nums[right]; while(sum >= s){ minLen = min(minLen, right-left+1); sum -= nums[left++]; } } return minLen == INT_MAX? 0: minLen; } }; int main(){ vector<int> nums{2,3,1,2,4,3}; cout << Solution().minSubArrayLen(7, nums); return 0; }
[ "siddhantnagpal03@gmail.com" ]
siddhantnagpal03@gmail.com
ef277d7f83b1ed5b7ef37547cba5d34dd84895c2
e8e45c58358631dc39f54cdc024feef95715db3b
/Cpp/source/common/include/ErrorInfo.h
f58140fd218d86c0ab1895355535eb009c47294e
[ "MIT" ]
permissive
jesson3264/OpenCL
78771c1775878ee7baca96fa1741469af045283a
f6144db4b4414afb5a46f598586e5ece28e27d5c
refs/heads/main
2023-06-04T12:07:47.387442
2021-06-27T14:26:08
2021-06-27T14:26:08
380,759,581
0
0
null
null
null
null
UTF-8
C++
false
false
422
h
#ifndef __ERROR_INFO_H__ #define __ERROR_INFO_H__ #include <string> using std::string; typedef struct ErrorInfo { ErrorInfo() { err_no_= 0; } ErrorInfo(int e, int l, string s) { err_no_ = e; line_num_ = l; info_ = s; } int err_no_; int line_num_; std::string info_; }ErrorInfo; enum ErrNo { // IniReader ERR_INI_SYNTAX_ERR = 1, ERR_INI_NO_SECTION = 2 }; #endif
[ "jesson3264@163.com" ]
jesson3264@163.com
7295a4245c4b2ee735a2f948202577a74ebec015
00eb9e26d5f772bbea001f4f43cb403865d50398
/OpenGL/src/cpp/Texture.cpp
fe3fd8a882d260b249962b95356b7f13d8fb312d
[]
no_license
KylePearce-SoftwareDeveloper/OpenGLEngine
2ff609b8f314b955196e470287ce3bc25f268297
25fccc28cb4c36160aceb95585d0117471cc8005
refs/heads/master
2022-12-05T11:52:51.749690
2020-08-21T12:58:42
2020-08-21T12:58:42
277,328,607
0
0
null
null
null
null
UTF-8
C++
false
false
1,227
cpp
#include "../hpp/Texture.h" #include "stb_image/stb_image.h" Texture::Texture(const std::string& path) : m_RendererID(0), m_FilePath(path), m_LocalBuffer(nullptr), m_Width(0), m_Height(0), m_BPP(0) { stbi_set_flip_vertically_on_load(1); m_LocalBuffer = stbi_load(path.c_str(), &m_Width, &m_Height, &m_BPP, 4); GLCall(glGenTextures(1, &m_RendererID)); GLCall(glBindTexture(GL_TEXTURE_2D, m_RendererID)); GLCall(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR)); GLCall(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR)); GLCall(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE)); GLCall(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE)); GLCall(glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, m_Width, m_Height, 0, GL_RGBA, GL_UNSIGNED_BYTE, m_LocalBuffer)); GLCall(glBindTexture(GL_TEXTURE_2D, 0)); if (m_LocalBuffer) stbi_image_free(m_LocalBuffer); } Texture::~Texture() { GLCall(glDeleteTextures(1, &m_RendererID)); } void Texture::Bind(unsigned int slot) const { GLCall(glActiveTexture(GL_TEXTURE0 + slot)); GLCall(glBindTexture(GL_TEXTURE_2D, m_RendererID)); } void Texture::Unbind() const { GLCall(glBindTexture(GL_TEXTURE_2D, 0)); }
[ "kylepearcesoftwaredeveloper@gmail.com" ]
kylepearcesoftwaredeveloper@gmail.com
722dd5bd7150a14a83382bc08a00b9c98ca2e6ed
85e3ad5791e51c878e388cb517528b4a7d313aa5
/PokePlusPlus/Game.cpp
0c36d56e32d4ba989824c10e03c84bce8120fc87
[]
no_license
Touchette/PokePlusPlus
47b61c736b1be33f8be52422e19cc85fba4bac3d
58fa2323b671aebf37deeb303d53a5db08e57331
refs/heads/master
2020-04-25T21:38:39.740061
2019-04-05T23:45:49
2019-04-05T23:45:49
173,085,977
5
0
null
null
null
null
UTF-8
C++
false
false
4,073
cpp
#include "Game.h" // +--------------------------+ // | Constructor / Destructor | // +--------------------------+ Game::Game() { this->initVariables(); this->initWindow(); this->initKeys(); this->initStates(); } Game::~Game() { // Clean up the window delete this->window; // Clean up the states while (!this->states.empty()) { delete this->states.top(); this->states.pop(); } } // +------------------+ // | Static Functions | // +------------------+ // +--------------------------+ // | Initialization Functions | // +--------------------------+ void Game::initVariables() { this->window = nullptr; this->dt = 0.0f; } void Game::initWindow() { std::string title = "NULL"; sf::VideoMode window_bounds(160, 144); unsigned framerate_limit = 30; bool vsync_enabled = 0; sf::Image icon; // Read from the window settings file... std::ifstream settings("Settings/window.ini"); // ...And into some variables for use in setting up the window later if (settings.is_open()) { std::getline(settings, title); settings >> window_bounds.width >> window_bounds.height; settings >> framerate_limit; settings >> vsync_enabled; } // Create the main SFML Window and set up some settings for rendering this->window = new sf::RenderWindow(window_bounds, title, sf::Style::Close | sf::Style::Titlebar); this->window->setFramerateLimit(framerate_limit); this->window->setVerticalSyncEnabled(vsync_enabled); // Loading and setting the icon if (!icon.loadFromFile("Sprites/icon.png")) { std::cerr << "Could not load icon file!" << std::endl; exit(EXIT_FAILURE); } else { // set the window icon const sf::Uint8 *iconPixels = icon.getPixelsPtr(); this->window->setIcon(12, 12, iconPixels); } this->view = new sf::View(sf::FloatRect(-0.0f, -0.0f, 320.0f, 288.0f)); window->setView(*view); settings.close(); } void Game::initKeys() { std::ifstream keys("Settings/supported_keys.ini"); // Initialize the supported keys from a file instead of hard // coding it, just reads them into a dictionary. In this case, all keys // are supported for binding in the settings files. if (keys.is_open()) { std::string key = ""; int key_value = 0; while (keys >> key >> key_value) { this->supportedKeys[key] = key_value; } } keys.close(); } void Game::initStates() { // Push the various states onto the state stack. this->states.push(new MainMenuState(this->window, this->view, &this->supportedKeys, &this->states)); } // +--------------------------+ // | Main Game Loop Functions | // +--------------------------+ void Game::run() { // Here we go! Main game loop while (this->window->isOpen()) { this->updateDt(); this->update(); this->render(); } } void Game::update() { // Update our event handler to check for input, etc this->updateSFMLEvents(); if (!this->states.empty()) { this->states.top()->update(this->dt); // If a state wants to quit, delete it and go to the next one. Every state // has a function to check if it wants to quit or not. if (this->states.top()->getQuit()) { this->states.top()->endState(); delete this->states.top(); this->states.pop(); } } else { // End the application this->endApplication(); this->window->close(); } } void Game::render() { this->window->clear(); // Rendering goes here. We only render the top state at any given time // so that the game doesn't have to draw everything on top of other stuff if (!this->states.empty()) { this->states.top()->render(this->window); } this->window->display(); } void Game::updateDt() { // Update the game clock to ensure that the tick rate is consistent. // This is passed to every single update function to ensure that they happen // consistently. this->dt = this->dtClock.restart().asSeconds(); } void Game::endApplication() { // } void Game::updateSFMLEvents() { // Handles the stock SFML events like closing the main window. while (this->window->pollEvent(this->sfEvent)) { switch (this->sfEvent.type) { case sf::Event::Closed: this->window->close(); break; } } }
[ "marionettis2@gmail.com" ]
marionettis2@gmail.com
51a3a88d790e7d31e8198dd02a4c3ff60f50b584
d199cc7fff33f75673153ba79e343028bc8c0524
/Date.cpp
472c8399e8b16aeb5c01f2ea3ef2ecf631b50b0f
[]
no_license
ydonia/Transaction_Manager-Academic
39c0c83114131ad5749de4eefee9a7656145b48d
11487e36623d618496def9d6b1085121b1e6a649
refs/heads/main
2023-04-05T02:30:06.572847
2021-03-28T01:15:00
2021-03-28T01:15:00
352,213,516
0
0
null
null
null
null
UTF-8
C++
false
false
1,277
cpp
// // Date.cpp // hw10 // // Created by Youssef Donia on 4/18/20. // Copyright © 2020 Youssef Donia. All rights reserved. // #define EXTRA_CREDIT #include "Date.h" void Date::set(int month_, int day_, int year_, int hour_) { month = month_; day = day_; year = year_; hour = hour_; } void Date::print() const { //change the month from int to string and name it depending on its number string month_; if (month == 1) month_ = "January"; if (month == 2) month_ = "February"; if (month == 3) month_ = "March"; if (month == 4) month_ = "April"; if (month == 5) month_ = "May"; if (month == 6) month_ = "June"; if (month == 7) month_ = "July"; if (month == 8) month_ = "August"; if (month == 9) month_ = "September"; if (month == 10) month_ = "October"; if (month == 11) month_ = "November"; if (month == 12) month_ = "December"; cout << month_ << " " << day << ", " << year << ", " << hour << ":00"; } int Date::getMonth() const { return month; } int Date::getDay() const { return day; } int Date::getYear() const { return year; } int Date::getHour() const { return hour; }
[ "youssef.donia@gmail.com" ]
youssef.donia@gmail.com
b2f0e68da5ad916c37c3fc8c8e472b50292c4ed2
d5ddb0f80b099cb2fb4ca189f732f8563f2896c8
/libraries/GCS_SIMPLE/.svn/text-base/GCS_SIMPLE.cpp.svn-base
a66f0d6b94de15670673ab3b7eabb5abe3a55d7a
[]
no_license
UBCSailbot/arduino
cfec2dfcb708a307ad21feb4fb83f72253068bcf
8d42fec7f611a6c036e550236d01cc13cb02347d
refs/heads/master
2021-01-23T16:35:29.512001
2014-06-09T21:23:13
2014-06-09T21:23:13
12,259,956
2
1
null
2014-06-08T18:31:18
2013-08-21T03:05:56
C++
UTF-8
C++
false
false
2,358
// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: t -*- // // DIYDrones Custom Mediatek GPS driver for ArduPilot and ArduPilotMega. // Code by Michael Smith, Jordi Munoz and Jose Julio, DIYDrones.com // // This library is free software; you can redistribute it and / or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // GPS configuration : Custom protocol per "DIYDrones Custom Binary Sentence Specification V1.1" // #include "GCS_SIMPLE.h" #include <stdint.h> // Public Methods ////////////////////////////////////////////////////////////// GCS_SIMPLE::GCS_SIMPLE(Stream *s) : _port(s) { } // Process bytes available from the stream // // The stream is assumed to contain only our custom message. If it // contains other messages, and those messages contain the preamble bytes, // it is possible for this code to become de-synchronised. Without // buffering the entire message and re-processing it from the top, // this is unavoidable. // // The lack of a standard header length field makes it impossible to skip // unrecognised messages. // bool GCS_SIMPLE::read(void) { uint8_t data; int numc; bool parsed = false; numc = _port->available(); for (int i = 0; i < numc; i++){ // Process bytes received // read the next byte data = _port->read(); restart: switch(_step){ case 0: if(52 == data){ _step++; _payload_counter = 0; } break; case 1: if (68 == data) { _step++; break; } _step = 0; goto restart; case 2: length = data; _step++; break; case 3: id = data; _step++; break; case 4: _buffer.bytes[_payload_counter++] = data; if (_payload_counter == sizeof(_buffer)){ _step = 0; parsed = true; } break; } } return parsed; }
[ "davidlee.drl@gmail.com" ]
davidlee.drl@gmail.com
09515cacb064d0e044d54c4a6beed8df4bf44987
097f47c14f8ce0152db2df8915bf4c82b5633976
/FYP_matrix/google-api/google/container/v1beta1/cluster_service.pb.cc
2424fa5ebaa85e95853a7ec128d4e23b9601568e
[]
no_license
BenjaminChia/Ben_FYP_RPi_Matrix
a1bbffa854be723e59f60358a1dbe7a44e0a1898
5a7952774e3f10ddc5ca56dccba82dba25471fd7
refs/heads/master
2020-03-29T07:10:53.329139
2018-09-21T00:54:08
2018-09-21T00:54:08
149,655,972
0
0
null
null
null
null
UTF-8
C++
false
true
1,131,534
cc
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/container/v1beta1/cluster_service.proto #include "google/container/v1beta1/cluster_service.pb.h" #include <algorithm> #include <google/protobuf/stubs/common.h> #include <google/protobuf/stubs/port.h> #include <google/protobuf/io/coded_stream.h> #include <google/protobuf/wire_format_lite_inl.h> #include <google/protobuf/descriptor.h> #include <google/protobuf/generated_message_reflection.h> #include <google/protobuf/reflection_ops.h> #include <google/protobuf/wire_format.h> // This is a temporary google only hack #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS #include "third_party/protobuf/version.h" #endif // @@protoc_insertion_point(includes) namespace protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto { extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_AcceleratorConfig; extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_AutoUpgradeOptions; extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_ClientCertificateConfig; extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_DailyMaintenanceWindow; extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_HorizontalPodAutoscaling; extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_HttpLoadBalancing; extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_IPAllocationPolicy; extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_KubernetesDashboard; extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_MasterAuthorizedNetworksConfig_CidrBlock; extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_NetworkPolicy; extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_NetworkPolicyConfig; extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_NodeConfig_LabelsEntry_DoNotUse; extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_NodeConfig_MetadataEntry_DoNotUse; extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_NodePoolAutoscaling; extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_NodeTaint; extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Operation; extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_PodSecurityPolicyConfig; extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_SetLabelsRequest_ResourceLabelsEntry_DoNotUse; extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_MaintenancePolicy; extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_MaintenanceWindow; extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_MasterAuth; extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_MasterAuthorizedNetworksConfig; extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_NodeManagement; extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto ::google::protobuf::internal::SCCInfo<3> scc_info_NodePool; extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto ::google::protobuf::internal::SCCInfo<4> scc_info_AddonsConfig; extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto ::google::protobuf::internal::SCCInfo<4> scc_info_ClusterUpdate; extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto ::google::protobuf::internal::SCCInfo<4> scc_info_NodeConfig; extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto ::google::protobuf::internal::SCCInfo<9> scc_info_Cluster; } // namespace protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto namespace google { namespace container { namespace v1beta1 { class NodeConfig_MetadataEntry_DoNotUseDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<NodeConfig_MetadataEntry_DoNotUse> _instance; } _NodeConfig_MetadataEntry_DoNotUse_default_instance_; class NodeConfig_LabelsEntry_DoNotUseDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<NodeConfig_LabelsEntry_DoNotUse> _instance; } _NodeConfig_LabelsEntry_DoNotUse_default_instance_; class NodeConfigDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<NodeConfig> _instance; } _NodeConfig_default_instance_; class NodeTaintDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<NodeTaint> _instance; } _NodeTaint_default_instance_; class MasterAuthDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<MasterAuth> _instance; } _MasterAuth_default_instance_; class ClientCertificateConfigDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<ClientCertificateConfig> _instance; } _ClientCertificateConfig_default_instance_; class AddonsConfigDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<AddonsConfig> _instance; } _AddonsConfig_default_instance_; class HttpLoadBalancingDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<HttpLoadBalancing> _instance; } _HttpLoadBalancing_default_instance_; class HorizontalPodAutoscalingDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<HorizontalPodAutoscaling> _instance; } _HorizontalPodAutoscaling_default_instance_; class KubernetesDashboardDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<KubernetesDashboard> _instance; } _KubernetesDashboard_default_instance_; class NetworkPolicyConfigDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<NetworkPolicyConfig> _instance; } _NetworkPolicyConfig_default_instance_; class MasterAuthorizedNetworksConfig_CidrBlockDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<MasterAuthorizedNetworksConfig_CidrBlock> _instance; } _MasterAuthorizedNetworksConfig_CidrBlock_default_instance_; class MasterAuthorizedNetworksConfigDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<MasterAuthorizedNetworksConfig> _instance; } _MasterAuthorizedNetworksConfig_default_instance_; class NetworkPolicyDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<NetworkPolicy> _instance; } _NetworkPolicy_default_instance_; class IPAllocationPolicyDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<IPAllocationPolicy> _instance; } _IPAllocationPolicy_default_instance_; class PodSecurityPolicyConfigDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<PodSecurityPolicyConfig> _instance; } _PodSecurityPolicyConfig_default_instance_; class ClusterDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<Cluster> _instance; } _Cluster_default_instance_; class ClusterUpdateDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<ClusterUpdate> _instance; } _ClusterUpdate_default_instance_; class OperationDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<Operation> _instance; } _Operation_default_instance_; class CreateClusterRequestDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<CreateClusterRequest> _instance; } _CreateClusterRequest_default_instance_; class GetClusterRequestDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<GetClusterRequest> _instance; } _GetClusterRequest_default_instance_; class UpdateClusterRequestDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<UpdateClusterRequest> _instance; } _UpdateClusterRequest_default_instance_; class SetMasterAuthRequestDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<SetMasterAuthRequest> _instance; } _SetMasterAuthRequest_default_instance_; class DeleteClusterRequestDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<DeleteClusterRequest> _instance; } _DeleteClusterRequest_default_instance_; class ListClustersRequestDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<ListClustersRequest> _instance; } _ListClustersRequest_default_instance_; class ListClustersResponseDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<ListClustersResponse> _instance; } _ListClustersResponse_default_instance_; class GetOperationRequestDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<GetOperationRequest> _instance; } _GetOperationRequest_default_instance_; class ListOperationsRequestDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<ListOperationsRequest> _instance; } _ListOperationsRequest_default_instance_; class CancelOperationRequestDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<CancelOperationRequest> _instance; } _CancelOperationRequest_default_instance_; class ListOperationsResponseDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<ListOperationsResponse> _instance; } _ListOperationsResponse_default_instance_; class GetServerConfigRequestDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<GetServerConfigRequest> _instance; } _GetServerConfigRequest_default_instance_; class ServerConfigDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<ServerConfig> _instance; } _ServerConfig_default_instance_; class CreateNodePoolRequestDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<CreateNodePoolRequest> _instance; } _CreateNodePoolRequest_default_instance_; class DeleteNodePoolRequestDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<DeleteNodePoolRequest> _instance; } _DeleteNodePoolRequest_default_instance_; class ListNodePoolsRequestDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<ListNodePoolsRequest> _instance; } _ListNodePoolsRequest_default_instance_; class GetNodePoolRequestDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<GetNodePoolRequest> _instance; } _GetNodePoolRequest_default_instance_; class NodePoolDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<NodePool> _instance; } _NodePool_default_instance_; class NodeManagementDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<NodeManagement> _instance; } _NodeManagement_default_instance_; class AutoUpgradeOptionsDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<AutoUpgradeOptions> _instance; } _AutoUpgradeOptions_default_instance_; class MaintenancePolicyDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<MaintenancePolicy> _instance; } _MaintenancePolicy_default_instance_; class MaintenanceWindowDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<MaintenanceWindow> _instance; const ::google::container::v1beta1::DailyMaintenanceWindow* daily_maintenance_window_; } _MaintenanceWindow_default_instance_; class DailyMaintenanceWindowDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<DailyMaintenanceWindow> _instance; } _DailyMaintenanceWindow_default_instance_; class SetNodePoolManagementRequestDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<SetNodePoolManagementRequest> _instance; } _SetNodePoolManagementRequest_default_instance_; class RollbackNodePoolUpgradeRequestDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<RollbackNodePoolUpgradeRequest> _instance; } _RollbackNodePoolUpgradeRequest_default_instance_; class ListNodePoolsResponseDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<ListNodePoolsResponse> _instance; } _ListNodePoolsResponse_default_instance_; class NodePoolAutoscalingDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<NodePoolAutoscaling> _instance; } _NodePoolAutoscaling_default_instance_; class SetLabelsRequest_ResourceLabelsEntry_DoNotUseDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<SetLabelsRequest_ResourceLabelsEntry_DoNotUse> _instance; } _SetLabelsRequest_ResourceLabelsEntry_DoNotUse_default_instance_; class SetLabelsRequestDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<SetLabelsRequest> _instance; } _SetLabelsRequest_default_instance_; class SetLegacyAbacRequestDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<SetLegacyAbacRequest> _instance; } _SetLegacyAbacRequest_default_instance_; class StartIPRotationRequestDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<StartIPRotationRequest> _instance; } _StartIPRotationRequest_default_instance_; class CompleteIPRotationRequestDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<CompleteIPRotationRequest> _instance; } _CompleteIPRotationRequest_default_instance_; class AcceleratorConfigDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<AcceleratorConfig> _instance; } _AcceleratorConfig_default_instance_; class SetNetworkPolicyRequestDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<SetNetworkPolicyRequest> _instance; } _SetNetworkPolicyRequest_default_instance_; class SetMaintenancePolicyRequestDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed<SetMaintenancePolicyRequest> _instance; } _SetMaintenancePolicyRequest_default_instance_; } // namespace v1beta1 } // namespace container } // namespace google namespace protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto { static void InitDefaultsNodeConfig_MetadataEntry_DoNotUse() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_NodeConfig_MetadataEntry_DoNotUse_default_instance_; new (ptr) ::google::container::v1beta1::NodeConfig_MetadataEntry_DoNotUse(); } ::google::container::v1beta1::NodeConfig_MetadataEntry_DoNotUse::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<0> scc_info_NodeConfig_MetadataEntry_DoNotUse = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsNodeConfig_MetadataEntry_DoNotUse}, {}}; static void InitDefaultsNodeConfig_LabelsEntry_DoNotUse() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_NodeConfig_LabelsEntry_DoNotUse_default_instance_; new (ptr) ::google::container::v1beta1::NodeConfig_LabelsEntry_DoNotUse(); } ::google::container::v1beta1::NodeConfig_LabelsEntry_DoNotUse::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<0> scc_info_NodeConfig_LabelsEntry_DoNotUse = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsNodeConfig_LabelsEntry_DoNotUse}, {}}; static void InitDefaultsNodeConfig() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_NodeConfig_default_instance_; new (ptr) ::google::container::v1beta1::NodeConfig(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::NodeConfig::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<4> scc_info_NodeConfig = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 4, InitDefaultsNodeConfig}, { &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_NodeConfig_MetadataEntry_DoNotUse.base, &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_NodeConfig_LabelsEntry_DoNotUse.base, &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_AcceleratorConfig.base, &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_NodeTaint.base,}}; static void InitDefaultsNodeTaint() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_NodeTaint_default_instance_; new (ptr) ::google::container::v1beta1::NodeTaint(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::NodeTaint::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<0> scc_info_NodeTaint = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsNodeTaint}, {}}; static void InitDefaultsMasterAuth() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_MasterAuth_default_instance_; new (ptr) ::google::container::v1beta1::MasterAuth(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::MasterAuth::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<1> scc_info_MasterAuth = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsMasterAuth}, { &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_ClientCertificateConfig.base,}}; static void InitDefaultsClientCertificateConfig() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_ClientCertificateConfig_default_instance_; new (ptr) ::google::container::v1beta1::ClientCertificateConfig(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::ClientCertificateConfig::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<0> scc_info_ClientCertificateConfig = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsClientCertificateConfig}, {}}; static void InitDefaultsAddonsConfig() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_AddonsConfig_default_instance_; new (ptr) ::google::container::v1beta1::AddonsConfig(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::AddonsConfig::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<4> scc_info_AddonsConfig = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 4, InitDefaultsAddonsConfig}, { &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_HttpLoadBalancing.base, &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_HorizontalPodAutoscaling.base, &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_KubernetesDashboard.base, &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_NetworkPolicyConfig.base,}}; static void InitDefaultsHttpLoadBalancing() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_HttpLoadBalancing_default_instance_; new (ptr) ::google::container::v1beta1::HttpLoadBalancing(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::HttpLoadBalancing::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<0> scc_info_HttpLoadBalancing = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsHttpLoadBalancing}, {}}; static void InitDefaultsHorizontalPodAutoscaling() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_HorizontalPodAutoscaling_default_instance_; new (ptr) ::google::container::v1beta1::HorizontalPodAutoscaling(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::HorizontalPodAutoscaling::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<0> scc_info_HorizontalPodAutoscaling = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsHorizontalPodAutoscaling}, {}}; static void InitDefaultsKubernetesDashboard() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_KubernetesDashboard_default_instance_; new (ptr) ::google::container::v1beta1::KubernetesDashboard(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::KubernetesDashboard::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<0> scc_info_KubernetesDashboard = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsKubernetesDashboard}, {}}; static void InitDefaultsNetworkPolicyConfig() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_NetworkPolicyConfig_default_instance_; new (ptr) ::google::container::v1beta1::NetworkPolicyConfig(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::NetworkPolicyConfig::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<0> scc_info_NetworkPolicyConfig = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsNetworkPolicyConfig}, {}}; static void InitDefaultsMasterAuthorizedNetworksConfig_CidrBlock() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_MasterAuthorizedNetworksConfig_CidrBlock_default_instance_; new (ptr) ::google::container::v1beta1::MasterAuthorizedNetworksConfig_CidrBlock(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::MasterAuthorizedNetworksConfig_CidrBlock::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<0> scc_info_MasterAuthorizedNetworksConfig_CidrBlock = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsMasterAuthorizedNetworksConfig_CidrBlock}, {}}; static void InitDefaultsMasterAuthorizedNetworksConfig() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_MasterAuthorizedNetworksConfig_default_instance_; new (ptr) ::google::container::v1beta1::MasterAuthorizedNetworksConfig(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::MasterAuthorizedNetworksConfig::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<1> scc_info_MasterAuthorizedNetworksConfig = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsMasterAuthorizedNetworksConfig}, { &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_MasterAuthorizedNetworksConfig_CidrBlock.base,}}; static void InitDefaultsNetworkPolicy() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_NetworkPolicy_default_instance_; new (ptr) ::google::container::v1beta1::NetworkPolicy(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::NetworkPolicy::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<0> scc_info_NetworkPolicy = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsNetworkPolicy}, {}}; static void InitDefaultsIPAllocationPolicy() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_IPAllocationPolicy_default_instance_; new (ptr) ::google::container::v1beta1::IPAllocationPolicy(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::IPAllocationPolicy::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<0> scc_info_IPAllocationPolicy = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsIPAllocationPolicy}, {}}; static void InitDefaultsPodSecurityPolicyConfig() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_PodSecurityPolicyConfig_default_instance_; new (ptr) ::google::container::v1beta1::PodSecurityPolicyConfig(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::PodSecurityPolicyConfig::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<0> scc_info_PodSecurityPolicyConfig = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsPodSecurityPolicyConfig}, {}}; static void InitDefaultsCluster() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_Cluster_default_instance_; new (ptr) ::google::container::v1beta1::Cluster(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::Cluster::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<9> scc_info_Cluster = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 9, InitDefaultsCluster}, { &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_NodeConfig.base, &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_MasterAuth.base, &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_AddonsConfig.base, &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_NodePool.base, &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_NetworkPolicy.base, &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_IPAllocationPolicy.base, &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_MasterAuthorizedNetworksConfig.base, &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_MaintenancePolicy.base, &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_PodSecurityPolicyConfig.base,}}; static void InitDefaultsClusterUpdate() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_ClusterUpdate_default_instance_; new (ptr) ::google::container::v1beta1::ClusterUpdate(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::ClusterUpdate::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<4> scc_info_ClusterUpdate = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 4, InitDefaultsClusterUpdate}, { &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_AddonsConfig.base, &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_NodePoolAutoscaling.base, &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_MasterAuthorizedNetworksConfig.base, &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_PodSecurityPolicyConfig.base,}}; static void InitDefaultsOperation() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_Operation_default_instance_; new (ptr) ::google::container::v1beta1::Operation(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::Operation::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<0> scc_info_Operation = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsOperation}, {}}; static void InitDefaultsCreateClusterRequest() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_CreateClusterRequest_default_instance_; new (ptr) ::google::container::v1beta1::CreateClusterRequest(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::CreateClusterRequest::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<1> scc_info_CreateClusterRequest = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsCreateClusterRequest}, { &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_Cluster.base,}}; static void InitDefaultsGetClusterRequest() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_GetClusterRequest_default_instance_; new (ptr) ::google::container::v1beta1::GetClusterRequest(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::GetClusterRequest::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<0> scc_info_GetClusterRequest = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsGetClusterRequest}, {}}; static void InitDefaultsUpdateClusterRequest() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_UpdateClusterRequest_default_instance_; new (ptr) ::google::container::v1beta1::UpdateClusterRequest(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::UpdateClusterRequest::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<1> scc_info_UpdateClusterRequest = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsUpdateClusterRequest}, { &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_ClusterUpdate.base,}}; static void InitDefaultsSetMasterAuthRequest() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_SetMasterAuthRequest_default_instance_; new (ptr) ::google::container::v1beta1::SetMasterAuthRequest(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::SetMasterAuthRequest::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<1> scc_info_SetMasterAuthRequest = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsSetMasterAuthRequest}, { &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_MasterAuth.base,}}; static void InitDefaultsDeleteClusterRequest() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_DeleteClusterRequest_default_instance_; new (ptr) ::google::container::v1beta1::DeleteClusterRequest(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::DeleteClusterRequest::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<0> scc_info_DeleteClusterRequest = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsDeleteClusterRequest}, {}}; static void InitDefaultsListClustersRequest() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_ListClustersRequest_default_instance_; new (ptr) ::google::container::v1beta1::ListClustersRequest(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::ListClustersRequest::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<0> scc_info_ListClustersRequest = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsListClustersRequest}, {}}; static void InitDefaultsListClustersResponse() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_ListClustersResponse_default_instance_; new (ptr) ::google::container::v1beta1::ListClustersResponse(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::ListClustersResponse::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<1> scc_info_ListClustersResponse = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsListClustersResponse}, { &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_Cluster.base,}}; static void InitDefaultsGetOperationRequest() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_GetOperationRequest_default_instance_; new (ptr) ::google::container::v1beta1::GetOperationRequest(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::GetOperationRequest::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<0> scc_info_GetOperationRequest = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsGetOperationRequest}, {}}; static void InitDefaultsListOperationsRequest() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_ListOperationsRequest_default_instance_; new (ptr) ::google::container::v1beta1::ListOperationsRequest(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::ListOperationsRequest::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<0> scc_info_ListOperationsRequest = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsListOperationsRequest}, {}}; static void InitDefaultsCancelOperationRequest() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_CancelOperationRequest_default_instance_; new (ptr) ::google::container::v1beta1::CancelOperationRequest(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::CancelOperationRequest::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<0> scc_info_CancelOperationRequest = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsCancelOperationRequest}, {}}; static void InitDefaultsListOperationsResponse() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_ListOperationsResponse_default_instance_; new (ptr) ::google::container::v1beta1::ListOperationsResponse(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::ListOperationsResponse::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<1> scc_info_ListOperationsResponse = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsListOperationsResponse}, { &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_Operation.base,}}; static void InitDefaultsGetServerConfigRequest() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_GetServerConfigRequest_default_instance_; new (ptr) ::google::container::v1beta1::GetServerConfigRequest(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::GetServerConfigRequest::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<0> scc_info_GetServerConfigRequest = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsGetServerConfigRequest}, {}}; static void InitDefaultsServerConfig() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_ServerConfig_default_instance_; new (ptr) ::google::container::v1beta1::ServerConfig(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::ServerConfig::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<0> scc_info_ServerConfig = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsServerConfig}, {}}; static void InitDefaultsCreateNodePoolRequest() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_CreateNodePoolRequest_default_instance_; new (ptr) ::google::container::v1beta1::CreateNodePoolRequest(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::CreateNodePoolRequest::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<1> scc_info_CreateNodePoolRequest = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsCreateNodePoolRequest}, { &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_NodePool.base,}}; static void InitDefaultsDeleteNodePoolRequest() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_DeleteNodePoolRequest_default_instance_; new (ptr) ::google::container::v1beta1::DeleteNodePoolRequest(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::DeleteNodePoolRequest::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<0> scc_info_DeleteNodePoolRequest = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsDeleteNodePoolRequest}, {}}; static void InitDefaultsListNodePoolsRequest() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_ListNodePoolsRequest_default_instance_; new (ptr) ::google::container::v1beta1::ListNodePoolsRequest(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::ListNodePoolsRequest::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<0> scc_info_ListNodePoolsRequest = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsListNodePoolsRequest}, {}}; static void InitDefaultsGetNodePoolRequest() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_GetNodePoolRequest_default_instance_; new (ptr) ::google::container::v1beta1::GetNodePoolRequest(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::GetNodePoolRequest::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<0> scc_info_GetNodePoolRequest = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsGetNodePoolRequest}, {}}; static void InitDefaultsNodePool() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_NodePool_default_instance_; new (ptr) ::google::container::v1beta1::NodePool(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::NodePool::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<3> scc_info_NodePool = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsNodePool}, { &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_NodeConfig.base, &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_NodePoolAutoscaling.base, &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_NodeManagement.base,}}; static void InitDefaultsNodeManagement() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_NodeManagement_default_instance_; new (ptr) ::google::container::v1beta1::NodeManagement(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::NodeManagement::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<1> scc_info_NodeManagement = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsNodeManagement}, { &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_AutoUpgradeOptions.base,}}; static void InitDefaultsAutoUpgradeOptions() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_AutoUpgradeOptions_default_instance_; new (ptr) ::google::container::v1beta1::AutoUpgradeOptions(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::AutoUpgradeOptions::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<0> scc_info_AutoUpgradeOptions = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsAutoUpgradeOptions}, {}}; static void InitDefaultsMaintenancePolicy() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_MaintenancePolicy_default_instance_; new (ptr) ::google::container::v1beta1::MaintenancePolicy(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::MaintenancePolicy::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<1> scc_info_MaintenancePolicy = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsMaintenancePolicy}, { &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_MaintenanceWindow.base,}}; static void InitDefaultsMaintenanceWindow() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_MaintenanceWindow_default_instance_; new (ptr) ::google::container::v1beta1::MaintenanceWindow(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::MaintenanceWindow::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<1> scc_info_MaintenanceWindow = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsMaintenanceWindow}, { &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_DailyMaintenanceWindow.base,}}; static void InitDefaultsDailyMaintenanceWindow() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_DailyMaintenanceWindow_default_instance_; new (ptr) ::google::container::v1beta1::DailyMaintenanceWindow(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::DailyMaintenanceWindow::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<0> scc_info_DailyMaintenanceWindow = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsDailyMaintenanceWindow}, {}}; static void InitDefaultsSetNodePoolManagementRequest() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_SetNodePoolManagementRequest_default_instance_; new (ptr) ::google::container::v1beta1::SetNodePoolManagementRequest(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::SetNodePoolManagementRequest::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<1> scc_info_SetNodePoolManagementRequest = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsSetNodePoolManagementRequest}, { &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_NodeManagement.base,}}; static void InitDefaultsRollbackNodePoolUpgradeRequest() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_RollbackNodePoolUpgradeRequest_default_instance_; new (ptr) ::google::container::v1beta1::RollbackNodePoolUpgradeRequest(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::RollbackNodePoolUpgradeRequest::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<0> scc_info_RollbackNodePoolUpgradeRequest = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsRollbackNodePoolUpgradeRequest}, {}}; static void InitDefaultsListNodePoolsResponse() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_ListNodePoolsResponse_default_instance_; new (ptr) ::google::container::v1beta1::ListNodePoolsResponse(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::ListNodePoolsResponse::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<1> scc_info_ListNodePoolsResponse = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsListNodePoolsResponse}, { &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_NodePool.base,}}; static void InitDefaultsNodePoolAutoscaling() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_NodePoolAutoscaling_default_instance_; new (ptr) ::google::container::v1beta1::NodePoolAutoscaling(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::NodePoolAutoscaling::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<0> scc_info_NodePoolAutoscaling = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsNodePoolAutoscaling}, {}}; static void InitDefaultsSetLabelsRequest_ResourceLabelsEntry_DoNotUse() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_SetLabelsRequest_ResourceLabelsEntry_DoNotUse_default_instance_; new (ptr) ::google::container::v1beta1::SetLabelsRequest_ResourceLabelsEntry_DoNotUse(); } ::google::container::v1beta1::SetLabelsRequest_ResourceLabelsEntry_DoNotUse::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<0> scc_info_SetLabelsRequest_ResourceLabelsEntry_DoNotUse = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsSetLabelsRequest_ResourceLabelsEntry_DoNotUse}, {}}; static void InitDefaultsSetLabelsRequest() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_SetLabelsRequest_default_instance_; new (ptr) ::google::container::v1beta1::SetLabelsRequest(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::SetLabelsRequest::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<1> scc_info_SetLabelsRequest = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsSetLabelsRequest}, { &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_SetLabelsRequest_ResourceLabelsEntry_DoNotUse.base,}}; static void InitDefaultsSetLegacyAbacRequest() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_SetLegacyAbacRequest_default_instance_; new (ptr) ::google::container::v1beta1::SetLegacyAbacRequest(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::SetLegacyAbacRequest::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<0> scc_info_SetLegacyAbacRequest = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsSetLegacyAbacRequest}, {}}; static void InitDefaultsStartIPRotationRequest() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_StartIPRotationRequest_default_instance_; new (ptr) ::google::container::v1beta1::StartIPRotationRequest(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::StartIPRotationRequest::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<0> scc_info_StartIPRotationRequest = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsStartIPRotationRequest}, {}}; static void InitDefaultsCompleteIPRotationRequest() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_CompleteIPRotationRequest_default_instance_; new (ptr) ::google::container::v1beta1::CompleteIPRotationRequest(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::CompleteIPRotationRequest::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<0> scc_info_CompleteIPRotationRequest = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsCompleteIPRotationRequest}, {}}; static void InitDefaultsAcceleratorConfig() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_AcceleratorConfig_default_instance_; new (ptr) ::google::container::v1beta1::AcceleratorConfig(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::AcceleratorConfig::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<0> scc_info_AcceleratorConfig = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsAcceleratorConfig}, {}}; static void InitDefaultsSetNetworkPolicyRequest() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_SetNetworkPolicyRequest_default_instance_; new (ptr) ::google::container::v1beta1::SetNetworkPolicyRequest(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::SetNetworkPolicyRequest::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<1> scc_info_SetNetworkPolicyRequest = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsSetNetworkPolicyRequest}, { &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_NetworkPolicy.base,}}; static void InitDefaultsSetMaintenancePolicyRequest() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::container::v1beta1::_SetMaintenancePolicyRequest_default_instance_; new (ptr) ::google::container::v1beta1::SetMaintenancePolicyRequest(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } ::google::container::v1beta1::SetMaintenancePolicyRequest::InitAsDefaultInstance(); } ::google::protobuf::internal::SCCInfo<1> scc_info_SetMaintenancePolicyRequest = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsSetMaintenancePolicyRequest}, { &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_MaintenancePolicy.base,}}; void InitDefaults() { ::google::protobuf::internal::InitSCC(&scc_info_NodeConfig_MetadataEntry_DoNotUse.base); ::google::protobuf::internal::InitSCC(&scc_info_NodeConfig_LabelsEntry_DoNotUse.base); ::google::protobuf::internal::InitSCC(&scc_info_NodeConfig.base); ::google::protobuf::internal::InitSCC(&scc_info_NodeTaint.base); ::google::protobuf::internal::InitSCC(&scc_info_MasterAuth.base); ::google::protobuf::internal::InitSCC(&scc_info_ClientCertificateConfig.base); ::google::protobuf::internal::InitSCC(&scc_info_AddonsConfig.base); ::google::protobuf::internal::InitSCC(&scc_info_HttpLoadBalancing.base); ::google::protobuf::internal::InitSCC(&scc_info_HorizontalPodAutoscaling.base); ::google::protobuf::internal::InitSCC(&scc_info_KubernetesDashboard.base); ::google::protobuf::internal::InitSCC(&scc_info_NetworkPolicyConfig.base); ::google::protobuf::internal::InitSCC(&scc_info_MasterAuthorizedNetworksConfig_CidrBlock.base); ::google::protobuf::internal::InitSCC(&scc_info_MasterAuthorizedNetworksConfig.base); ::google::protobuf::internal::InitSCC(&scc_info_NetworkPolicy.base); ::google::protobuf::internal::InitSCC(&scc_info_IPAllocationPolicy.base); ::google::protobuf::internal::InitSCC(&scc_info_PodSecurityPolicyConfig.base); ::google::protobuf::internal::InitSCC(&scc_info_Cluster.base); ::google::protobuf::internal::InitSCC(&scc_info_ClusterUpdate.base); ::google::protobuf::internal::InitSCC(&scc_info_Operation.base); ::google::protobuf::internal::InitSCC(&scc_info_CreateClusterRequest.base); ::google::protobuf::internal::InitSCC(&scc_info_GetClusterRequest.base); ::google::protobuf::internal::InitSCC(&scc_info_UpdateClusterRequest.base); ::google::protobuf::internal::InitSCC(&scc_info_SetMasterAuthRequest.base); ::google::protobuf::internal::InitSCC(&scc_info_DeleteClusterRequest.base); ::google::protobuf::internal::InitSCC(&scc_info_ListClustersRequest.base); ::google::protobuf::internal::InitSCC(&scc_info_ListClustersResponse.base); ::google::protobuf::internal::InitSCC(&scc_info_GetOperationRequest.base); ::google::protobuf::internal::InitSCC(&scc_info_ListOperationsRequest.base); ::google::protobuf::internal::InitSCC(&scc_info_CancelOperationRequest.base); ::google::protobuf::internal::InitSCC(&scc_info_ListOperationsResponse.base); ::google::protobuf::internal::InitSCC(&scc_info_GetServerConfigRequest.base); ::google::protobuf::internal::InitSCC(&scc_info_ServerConfig.base); ::google::protobuf::internal::InitSCC(&scc_info_CreateNodePoolRequest.base); ::google::protobuf::internal::InitSCC(&scc_info_DeleteNodePoolRequest.base); ::google::protobuf::internal::InitSCC(&scc_info_ListNodePoolsRequest.base); ::google::protobuf::internal::InitSCC(&scc_info_GetNodePoolRequest.base); ::google::protobuf::internal::InitSCC(&scc_info_NodePool.base); ::google::protobuf::internal::InitSCC(&scc_info_NodeManagement.base); ::google::protobuf::internal::InitSCC(&scc_info_AutoUpgradeOptions.base); ::google::protobuf::internal::InitSCC(&scc_info_MaintenancePolicy.base); ::google::protobuf::internal::InitSCC(&scc_info_MaintenanceWindow.base); ::google::protobuf::internal::InitSCC(&scc_info_DailyMaintenanceWindow.base); ::google::protobuf::internal::InitSCC(&scc_info_SetNodePoolManagementRequest.base); ::google::protobuf::internal::InitSCC(&scc_info_RollbackNodePoolUpgradeRequest.base); ::google::protobuf::internal::InitSCC(&scc_info_ListNodePoolsResponse.base); ::google::protobuf::internal::InitSCC(&scc_info_NodePoolAutoscaling.base); ::google::protobuf::internal::InitSCC(&scc_info_SetLabelsRequest_ResourceLabelsEntry_DoNotUse.base); ::google::protobuf::internal::InitSCC(&scc_info_SetLabelsRequest.base); ::google::protobuf::internal::InitSCC(&scc_info_SetLegacyAbacRequest.base); ::google::protobuf::internal::InitSCC(&scc_info_StartIPRotationRequest.base); ::google::protobuf::internal::InitSCC(&scc_info_CompleteIPRotationRequest.base); ::google::protobuf::internal::InitSCC(&scc_info_AcceleratorConfig.base); ::google::protobuf::internal::InitSCC(&scc_info_SetNetworkPolicyRequest.base); ::google::protobuf::internal::InitSCC(&scc_info_SetMaintenancePolicyRequest.base); } ::google::protobuf::Metadata file_level_metadata[54]; const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[7]; const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NodeConfig_MetadataEntry_DoNotUse, _has_bits_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NodeConfig_MetadataEntry_DoNotUse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NodeConfig_MetadataEntry_DoNotUse, key_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NodeConfig_MetadataEntry_DoNotUse, value_), 0, 1, GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NodeConfig_LabelsEntry_DoNotUse, _has_bits_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NodeConfig_LabelsEntry_DoNotUse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NodeConfig_LabelsEntry_DoNotUse, key_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NodeConfig_LabelsEntry_DoNotUse, value_), 0, 1, ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NodeConfig, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NodeConfig, machine_type_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NodeConfig, disk_size_gb_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NodeConfig, oauth_scopes_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NodeConfig, service_account_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NodeConfig, metadata_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NodeConfig, image_type_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NodeConfig, labels_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NodeConfig, local_ssd_count_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NodeConfig, tags_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NodeConfig, preemptible_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NodeConfig, accelerators_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NodeConfig, min_cpu_platform_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NodeConfig, taints_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NodeTaint, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NodeTaint, key_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NodeTaint, value_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NodeTaint, effect_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::MasterAuth, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::MasterAuth, username_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::MasterAuth, password_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::MasterAuth, client_certificate_config_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::MasterAuth, cluster_ca_certificate_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::MasterAuth, client_certificate_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::MasterAuth, client_key_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::ClientCertificateConfig, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::ClientCertificateConfig, issue_client_certificate_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::AddonsConfig, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::AddonsConfig, http_load_balancing_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::AddonsConfig, horizontal_pod_autoscaling_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::AddonsConfig, kubernetes_dashboard_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::AddonsConfig, network_policy_config_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::HttpLoadBalancing, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::HttpLoadBalancing, disabled_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::HorizontalPodAutoscaling, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::HorizontalPodAutoscaling, disabled_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::KubernetesDashboard, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::KubernetesDashboard, disabled_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NetworkPolicyConfig, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NetworkPolicyConfig, disabled_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::MasterAuthorizedNetworksConfig_CidrBlock, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::MasterAuthorizedNetworksConfig_CidrBlock, display_name_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::MasterAuthorizedNetworksConfig_CidrBlock, cidr_block_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::MasterAuthorizedNetworksConfig, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::MasterAuthorizedNetworksConfig, enabled_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::MasterAuthorizedNetworksConfig, cidr_blocks_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NetworkPolicy, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NetworkPolicy, provider_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NetworkPolicy, enabled_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::IPAllocationPolicy, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::IPAllocationPolicy, use_ip_aliases_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::IPAllocationPolicy, create_subnetwork_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::IPAllocationPolicy, subnetwork_name_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::IPAllocationPolicy, cluster_ipv4_cidr_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::IPAllocationPolicy, node_ipv4_cidr_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::IPAllocationPolicy, services_ipv4_cidr_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::IPAllocationPolicy, cluster_secondary_range_name_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::IPAllocationPolicy, services_secondary_range_name_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::IPAllocationPolicy, cluster_ipv4_cidr_block_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::IPAllocationPolicy, node_ipv4_cidr_block_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::IPAllocationPolicy, services_ipv4_cidr_block_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::PodSecurityPolicyConfig, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::PodSecurityPolicyConfig, enabled_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Cluster, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Cluster, name_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Cluster, description_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Cluster, initial_node_count_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Cluster, node_config_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Cluster, master_auth_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Cluster, logging_service_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Cluster, monitoring_service_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Cluster, network_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Cluster, cluster_ipv4_cidr_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Cluster, addons_config_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Cluster, subnetwork_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Cluster, node_pools_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Cluster, locations_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Cluster, enable_kubernetes_alpha_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Cluster, network_policy_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Cluster, ip_allocation_policy_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Cluster, master_authorized_networks_config_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Cluster, maintenance_policy_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Cluster, pod_security_policy_config_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Cluster, self_link_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Cluster, zone_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Cluster, endpoint_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Cluster, initial_cluster_version_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Cluster, current_master_version_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Cluster, current_node_version_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Cluster, create_time_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Cluster, status_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Cluster, status_message_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Cluster, node_ipv4_cidr_size_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Cluster, services_ipv4_cidr_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Cluster, instance_group_urls_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Cluster, current_node_count_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Cluster, expire_time_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Cluster, location_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::ClusterUpdate, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::ClusterUpdate, desired_node_version_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::ClusterUpdate, desired_monitoring_service_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::ClusterUpdate, desired_addons_config_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::ClusterUpdate, desired_node_pool_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::ClusterUpdate, desired_image_type_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::ClusterUpdate, desired_node_pool_autoscaling_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::ClusterUpdate, desired_locations_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::ClusterUpdate, desired_master_authorized_networks_config_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::ClusterUpdate, desired_pod_security_policy_config_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::ClusterUpdate, desired_master_version_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Operation, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Operation, name_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Operation, zone_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Operation, operation_type_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Operation, status_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Operation, detail_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Operation, status_message_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Operation, self_link_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Operation, target_link_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Operation, location_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Operation, start_time_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::Operation, end_time_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::CreateClusterRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::CreateClusterRequest, project_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::CreateClusterRequest, zone_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::CreateClusterRequest, cluster_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::CreateClusterRequest, parent_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::GetClusterRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::GetClusterRequest, project_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::GetClusterRequest, zone_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::GetClusterRequest, cluster_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::GetClusterRequest, name_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::UpdateClusterRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::UpdateClusterRequest, project_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::UpdateClusterRequest, zone_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::UpdateClusterRequest, cluster_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::UpdateClusterRequest, update_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::UpdateClusterRequest, name_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::SetMasterAuthRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::SetMasterAuthRequest, project_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::SetMasterAuthRequest, zone_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::SetMasterAuthRequest, cluster_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::SetMasterAuthRequest, action_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::SetMasterAuthRequest, update_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::SetMasterAuthRequest, name_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::DeleteClusterRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::DeleteClusterRequest, project_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::DeleteClusterRequest, zone_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::DeleteClusterRequest, cluster_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::DeleteClusterRequest, name_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::ListClustersRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::ListClustersRequest, project_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::ListClustersRequest, zone_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::ListClustersRequest, parent_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::ListClustersResponse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::ListClustersResponse, clusters_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::ListClustersResponse, missing_zones_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::GetOperationRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::GetOperationRequest, project_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::GetOperationRequest, zone_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::GetOperationRequest, operation_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::GetOperationRequest, name_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::ListOperationsRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::ListOperationsRequest, project_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::ListOperationsRequest, zone_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::ListOperationsRequest, parent_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::CancelOperationRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::CancelOperationRequest, project_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::CancelOperationRequest, zone_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::CancelOperationRequest, operation_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::CancelOperationRequest, name_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::ListOperationsResponse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::ListOperationsResponse, operations_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::ListOperationsResponse, missing_zones_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::GetServerConfigRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::GetServerConfigRequest, project_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::GetServerConfigRequest, zone_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::GetServerConfigRequest, name_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::ServerConfig, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::ServerConfig, default_cluster_version_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::ServerConfig, valid_node_versions_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::ServerConfig, default_image_type_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::ServerConfig, valid_image_types_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::ServerConfig, valid_master_versions_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::CreateNodePoolRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::CreateNodePoolRequest, project_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::CreateNodePoolRequest, zone_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::CreateNodePoolRequest, cluster_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::CreateNodePoolRequest, node_pool_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::CreateNodePoolRequest, parent_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::DeleteNodePoolRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::DeleteNodePoolRequest, project_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::DeleteNodePoolRequest, zone_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::DeleteNodePoolRequest, cluster_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::DeleteNodePoolRequest, node_pool_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::DeleteNodePoolRequest, name_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::ListNodePoolsRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::ListNodePoolsRequest, project_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::ListNodePoolsRequest, zone_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::ListNodePoolsRequest, cluster_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::ListNodePoolsRequest, parent_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::GetNodePoolRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::GetNodePoolRequest, project_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::GetNodePoolRequest, zone_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::GetNodePoolRequest, cluster_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::GetNodePoolRequest, node_pool_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::GetNodePoolRequest, name_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NodePool, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NodePool, name_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NodePool, config_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NodePool, initial_node_count_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NodePool, self_link_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NodePool, version_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NodePool, instance_group_urls_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NodePool, status_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NodePool, status_message_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NodePool, autoscaling_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NodePool, management_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NodeManagement, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NodeManagement, auto_upgrade_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NodeManagement, auto_repair_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NodeManagement, upgrade_options_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::AutoUpgradeOptions, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::AutoUpgradeOptions, auto_upgrade_start_time_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::AutoUpgradeOptions, description_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::MaintenancePolicy, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::MaintenancePolicy, window_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::MaintenanceWindow, _internal_metadata_), ~0u, // no _extensions_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::MaintenanceWindow, _oneof_case_[0]), ~0u, // no _weak_field_map_ offsetof(::google::container::v1beta1::MaintenanceWindowDefaultTypeInternal, daily_maintenance_window_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::MaintenanceWindow, policy_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::DailyMaintenanceWindow, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::DailyMaintenanceWindow, start_time_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::DailyMaintenanceWindow, duration_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::SetNodePoolManagementRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::SetNodePoolManagementRequest, project_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::SetNodePoolManagementRequest, zone_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::SetNodePoolManagementRequest, cluster_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::SetNodePoolManagementRequest, node_pool_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::SetNodePoolManagementRequest, management_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::SetNodePoolManagementRequest, name_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::RollbackNodePoolUpgradeRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::RollbackNodePoolUpgradeRequest, project_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::RollbackNodePoolUpgradeRequest, zone_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::RollbackNodePoolUpgradeRequest, cluster_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::RollbackNodePoolUpgradeRequest, node_pool_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::RollbackNodePoolUpgradeRequest, name_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::ListNodePoolsResponse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::ListNodePoolsResponse, node_pools_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NodePoolAutoscaling, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NodePoolAutoscaling, enabled_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NodePoolAutoscaling, min_node_count_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::NodePoolAutoscaling, max_node_count_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::SetLabelsRequest_ResourceLabelsEntry_DoNotUse, _has_bits_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::SetLabelsRequest_ResourceLabelsEntry_DoNotUse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::SetLabelsRequest_ResourceLabelsEntry_DoNotUse, key_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::SetLabelsRequest_ResourceLabelsEntry_DoNotUse, value_), 0, 1, ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::SetLabelsRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::SetLabelsRequest, project_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::SetLabelsRequest, zone_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::SetLabelsRequest, cluster_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::SetLabelsRequest, resource_labels_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::SetLabelsRequest, label_fingerprint_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::SetLabelsRequest, name_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::SetLegacyAbacRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::SetLegacyAbacRequest, project_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::SetLegacyAbacRequest, zone_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::SetLegacyAbacRequest, cluster_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::SetLegacyAbacRequest, enabled_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::SetLegacyAbacRequest, name_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::StartIPRotationRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::StartIPRotationRequest, project_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::StartIPRotationRequest, zone_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::StartIPRotationRequest, cluster_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::StartIPRotationRequest, name_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::CompleteIPRotationRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::CompleteIPRotationRequest, project_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::CompleteIPRotationRequest, zone_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::CompleteIPRotationRequest, cluster_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::CompleteIPRotationRequest, name_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::AcceleratorConfig, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::AcceleratorConfig, accelerator_count_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::AcceleratorConfig, accelerator_type_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::SetNetworkPolicyRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::SetNetworkPolicyRequest, project_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::SetNetworkPolicyRequest, zone_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::SetNetworkPolicyRequest, cluster_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::SetNetworkPolicyRequest, network_policy_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::SetNetworkPolicyRequest, name_), ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::SetMaintenancePolicyRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::SetMaintenancePolicyRequest, project_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::SetMaintenancePolicyRequest, zone_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::SetMaintenancePolicyRequest, cluster_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::SetMaintenancePolicyRequest, maintenance_policy_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::container::v1beta1::SetMaintenancePolicyRequest, name_), }; static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { { 0, 7, sizeof(::google::container::v1beta1::NodeConfig_MetadataEntry_DoNotUse)}, { 9, 16, sizeof(::google::container::v1beta1::NodeConfig_LabelsEntry_DoNotUse)}, { 18, -1, sizeof(::google::container::v1beta1::NodeConfig)}, { 36, -1, sizeof(::google::container::v1beta1::NodeTaint)}, { 44, -1, sizeof(::google::container::v1beta1::MasterAuth)}, { 55, -1, sizeof(::google::container::v1beta1::ClientCertificateConfig)}, { 61, -1, sizeof(::google::container::v1beta1::AddonsConfig)}, { 70, -1, sizeof(::google::container::v1beta1::HttpLoadBalancing)}, { 76, -1, sizeof(::google::container::v1beta1::HorizontalPodAutoscaling)}, { 82, -1, sizeof(::google::container::v1beta1::KubernetesDashboard)}, { 88, -1, sizeof(::google::container::v1beta1::NetworkPolicyConfig)}, { 94, -1, sizeof(::google::container::v1beta1::MasterAuthorizedNetworksConfig_CidrBlock)}, { 101, -1, sizeof(::google::container::v1beta1::MasterAuthorizedNetworksConfig)}, { 108, -1, sizeof(::google::container::v1beta1::NetworkPolicy)}, { 115, -1, sizeof(::google::container::v1beta1::IPAllocationPolicy)}, { 131, -1, sizeof(::google::container::v1beta1::PodSecurityPolicyConfig)}, { 137, -1, sizeof(::google::container::v1beta1::Cluster)}, { 176, -1, sizeof(::google::container::v1beta1::ClusterUpdate)}, { 191, -1, sizeof(::google::container::v1beta1::Operation)}, { 207, -1, sizeof(::google::container::v1beta1::CreateClusterRequest)}, { 216, -1, sizeof(::google::container::v1beta1::GetClusterRequest)}, { 225, -1, sizeof(::google::container::v1beta1::UpdateClusterRequest)}, { 235, -1, sizeof(::google::container::v1beta1::SetMasterAuthRequest)}, { 246, -1, sizeof(::google::container::v1beta1::DeleteClusterRequest)}, { 255, -1, sizeof(::google::container::v1beta1::ListClustersRequest)}, { 263, -1, sizeof(::google::container::v1beta1::ListClustersResponse)}, { 270, -1, sizeof(::google::container::v1beta1::GetOperationRequest)}, { 279, -1, sizeof(::google::container::v1beta1::ListOperationsRequest)}, { 287, -1, sizeof(::google::container::v1beta1::CancelOperationRequest)}, { 296, -1, sizeof(::google::container::v1beta1::ListOperationsResponse)}, { 303, -1, sizeof(::google::container::v1beta1::GetServerConfigRequest)}, { 311, -1, sizeof(::google::container::v1beta1::ServerConfig)}, { 321, -1, sizeof(::google::container::v1beta1::CreateNodePoolRequest)}, { 331, -1, sizeof(::google::container::v1beta1::DeleteNodePoolRequest)}, { 341, -1, sizeof(::google::container::v1beta1::ListNodePoolsRequest)}, { 350, -1, sizeof(::google::container::v1beta1::GetNodePoolRequest)}, { 360, -1, sizeof(::google::container::v1beta1::NodePool)}, { 375, -1, sizeof(::google::container::v1beta1::NodeManagement)}, { 383, -1, sizeof(::google::container::v1beta1::AutoUpgradeOptions)}, { 390, -1, sizeof(::google::container::v1beta1::MaintenancePolicy)}, { 396, -1, sizeof(::google::container::v1beta1::MaintenanceWindow)}, { 403, -1, sizeof(::google::container::v1beta1::DailyMaintenanceWindow)}, { 410, -1, sizeof(::google::container::v1beta1::SetNodePoolManagementRequest)}, { 421, -1, sizeof(::google::container::v1beta1::RollbackNodePoolUpgradeRequest)}, { 431, -1, sizeof(::google::container::v1beta1::ListNodePoolsResponse)}, { 437, -1, sizeof(::google::container::v1beta1::NodePoolAutoscaling)}, { 445, 452, sizeof(::google::container::v1beta1::SetLabelsRequest_ResourceLabelsEntry_DoNotUse)}, { 454, -1, sizeof(::google::container::v1beta1::SetLabelsRequest)}, { 465, -1, sizeof(::google::container::v1beta1::SetLegacyAbacRequest)}, { 475, -1, sizeof(::google::container::v1beta1::StartIPRotationRequest)}, { 484, -1, sizeof(::google::container::v1beta1::CompleteIPRotationRequest)}, { 493, -1, sizeof(::google::container::v1beta1::AcceleratorConfig)}, { 500, -1, sizeof(::google::container::v1beta1::SetNetworkPolicyRequest)}, { 510, -1, sizeof(::google::container::v1beta1::SetMaintenancePolicyRequest)}, }; static ::google::protobuf::Message const * const file_default_instances[] = { reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_NodeConfig_MetadataEntry_DoNotUse_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_NodeConfig_LabelsEntry_DoNotUse_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_NodeConfig_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_NodeTaint_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_MasterAuth_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_ClientCertificateConfig_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_AddonsConfig_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_HttpLoadBalancing_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_HorizontalPodAutoscaling_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_KubernetesDashboard_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_NetworkPolicyConfig_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_MasterAuthorizedNetworksConfig_CidrBlock_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_MasterAuthorizedNetworksConfig_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_NetworkPolicy_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_IPAllocationPolicy_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_PodSecurityPolicyConfig_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_Cluster_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_ClusterUpdate_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_Operation_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_CreateClusterRequest_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_GetClusterRequest_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_UpdateClusterRequest_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_SetMasterAuthRequest_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_DeleteClusterRequest_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_ListClustersRequest_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_ListClustersResponse_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_GetOperationRequest_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_ListOperationsRequest_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_CancelOperationRequest_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_ListOperationsResponse_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_GetServerConfigRequest_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_ServerConfig_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_CreateNodePoolRequest_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_DeleteNodePoolRequest_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_ListNodePoolsRequest_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_GetNodePoolRequest_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_NodePool_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_NodeManagement_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_AutoUpgradeOptions_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_MaintenancePolicy_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_MaintenanceWindow_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_DailyMaintenanceWindow_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_SetNodePoolManagementRequest_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_RollbackNodePoolUpgradeRequest_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_ListNodePoolsResponse_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_NodePoolAutoscaling_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_SetLabelsRequest_ResourceLabelsEntry_DoNotUse_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_SetLabelsRequest_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_SetLegacyAbacRequest_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_StartIPRotationRequest_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_CompleteIPRotationRequest_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_AcceleratorConfig_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_SetNetworkPolicyRequest_default_instance_), reinterpret_cast<const ::google::protobuf::Message*>(&::google::container::v1beta1::_SetMaintenancePolicyRequest_default_instance_), }; void protobuf_AssignDescriptors() { AddDescriptors(); AssignDescriptors( "google/container/v1beta1/cluster_service.proto", schemas, file_default_instances, TableStruct::offsets, file_level_metadata, file_level_enum_descriptors, NULL); } void protobuf_AssignDescriptorsOnce() { static ::google::protobuf::internal::once_flag once; ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors); } void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD; void protobuf_RegisterTypes(const ::std::string&) { protobuf_AssignDescriptorsOnce(); ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 54); } void AddDescriptorsImpl() { InitDefaults(); static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { "\n.google/container/v1beta1/cluster_servi" "ce.proto\022\030google.container.v1beta1\032\034goog" "le/api/annotations.proto\032\033google/protobu" "f/empty.proto\"\261\004\n\nNodeConfig\022\024\n\014machine_" "type\030\001 \001(\t\022\024\n\014disk_size_gb\030\002 \001(\005\022\024\n\014oaut" "h_scopes\030\003 \003(\t\022\027\n\017service_account\030\t \001(\t\022" "D\n\010metadata\030\004 \003(\01322.google.container.v1b" "eta1.NodeConfig.MetadataEntry\022\022\n\nimage_t" "ype\030\005 \001(\t\022@\n\006labels\030\006 \003(\01320.google.conta" "iner.v1beta1.NodeConfig.LabelsEntry\022\027\n\017l" "ocal_ssd_count\030\007 \001(\005\022\014\n\004tags\030\010 \003(\t\022\023\n\013pr" "eemptible\030\n \001(\010\022A\n\014accelerators\030\013 \003(\0132+." "google.container.v1beta1.AcceleratorConf" "ig\022\030\n\020min_cpu_platform\030\r \001(\t\0223\n\006taints\030\017" " \003(\0132#.google.container.v1beta1.NodeTain" "t\032/\n\rMetadataEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value" "\030\002 \001(\t:\0028\001\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r" "\n\005value\030\002 \001(\t:\0028\001\"\276\001\n\tNodeTaint\022\013\n\003key\030\001" " \001(\t\022\r\n\005value\030\002 \001(\t\022:\n\006effect\030\003 \001(\0162*.go" "ogle.container.v1beta1.NodeTaint.Effect\"" "Y\n\006Effect\022\026\n\022EFFECT_UNSPECIFIED\020\000\022\017\n\013NO_" "SCHEDULE\020\001\022\026\n\022PREFER_NO_SCHEDULE\020\002\022\016\n\nNO" "_EXECUTE\020\003\"\326\001\n\nMasterAuth\022\020\n\010username\030\001 " "\001(\t\022\020\n\010password\030\002 \001(\t\022T\n\031client_certific" "ate_config\030\003 \001(\01321.google.container.v1be" "ta1.ClientCertificateConfig\022\036\n\026cluster_c" "a_certificate\030d \001(\t\022\032\n\022client_certificat" "e\030e \001(\t\022\022\n\nclient_key\030f \001(\t\";\n\027ClientCer" "tificateConfig\022 \n\030issue_client_certifica" "te\030\001 \001(\010\"\313\002\n\014AddonsConfig\022H\n\023http_load_b" "alancing\030\001 \001(\0132+.google.container.v1beta" "1.HttpLoadBalancing\022V\n\032horizontal_pod_au" "toscaling\030\002 \001(\01322.google.container.v1bet" "a1.HorizontalPodAutoscaling\022K\n\024kubernete" "s_dashboard\030\003 \001(\0132-.google.container.v1b" "eta1.KubernetesDashboard\022L\n\025network_poli" "cy_config\030\004 \001(\0132-.google.container.v1bet" "a1.NetworkPolicyConfig\"%\n\021HttpLoadBalanc" "ing\022\020\n\010disabled\030\001 \001(\010\",\n\030HorizontalPodAu" "toscaling\022\020\n\010disabled\030\001 \001(\010\"\'\n\023Kubernete" "sDashboard\022\020\n\010disabled\030\001 \001(\010\"\'\n\023NetworkP" "olicyConfig\022\020\n\010disabled\030\001 \001(\010\"\301\001\n\036Master" "AuthorizedNetworksConfig\022\017\n\007enabled\030\001 \001(" "\010\022W\n\013cidr_blocks\030\002 \003(\0132B.google.containe" "r.v1beta1.MasterAuthorizedNetworksConfig" ".CidrBlock\0325\n\tCidrBlock\022\024\n\014display_name\030" "\001 \001(\t\022\022\n\ncidr_block\030\002 \001(\t\"\226\001\n\rNetworkPol" "icy\022B\n\010provider\030\001 \001(\01620.google.container" ".v1beta1.NetworkPolicy.Provider\022\017\n\007enabl" "ed\030\002 \001(\010\"0\n\010Provider\022\030\n\024PROVIDER_UNSPECI" "FIED\020\000\022\n\n\006CALICO\020\001\"\335\002\n\022IPAllocationPolic" "y\022\026\n\016use_ip_aliases\030\001 \001(\010\022\031\n\021create_subn" "etwork\030\002 \001(\010\022\027\n\017subnetwork_name\030\003 \001(\t\022\031\n" "\021cluster_ipv4_cidr\030\004 \001(\t\022\026\n\016node_ipv4_ci" "dr\030\005 \001(\t\022\032\n\022services_ipv4_cidr\030\006 \001(\t\022$\n\034" "cluster_secondary_range_name\030\007 \001(\t\022%\n\035se" "rvices_secondary_range_name\030\010 \001(\t\022\037\n\027clu" "ster_ipv4_cidr_block\030\t \001(\t\022\034\n\024node_ipv4_" "cidr_block\030\n \001(\t\022 \n\030services_ipv4_cidr_b" "lock\030\013 \001(\t\"*\n\027PodSecurityPolicyConfig\022\017\n" "\007enabled\030\001 \001(\010\"\355\n\n\007Cluster\022\014\n\004name\030\001 \001(\t" "\022\023\n\013description\030\002 \001(\t\022\032\n\022initial_node_co" "unt\030\003 \001(\005\0229\n\013node_config\030\004 \001(\0132$.google." "container.v1beta1.NodeConfig\0229\n\013master_a" "uth\030\005 \001(\0132$.google.container.v1beta1.Mas" "terAuth\022\027\n\017logging_service\030\006 \001(\t\022\032\n\022moni" "toring_service\030\007 \001(\t\022\017\n\007network\030\010 \001(\t\022\031\n" "\021cluster_ipv4_cidr\030\t \001(\t\022=\n\raddons_confi" "g\030\n \001(\0132&.google.container.v1beta1.Addon" "sConfig\022\022\n\nsubnetwork\030\013 \001(\t\0226\n\nnode_pool" "s\030\014 \003(\0132\".google.container.v1beta1.NodeP" "ool\022\021\n\tlocations\030\r \003(\t\022\037\n\027enable_kuberne" "tes_alpha\030\016 \001(\010\022\?\n\016network_policy\030\023 \001(\0132" "\'.google.container.v1beta1.NetworkPolicy" "\022J\n\024ip_allocation_policy\030\024 \001(\0132,.google." "container.v1beta1.IPAllocationPolicy\022c\n!" "master_authorized_networks_config\030\026 \001(\0132" "8.google.container.v1beta1.MasterAuthori" "zedNetworksConfig\022G\n\022maintenance_policy\030" "\027 \001(\0132+.google.container.v1beta1.Mainten" "ancePolicy\022U\n\032pod_security_policy_config" "\030\031 \001(\01321.google.container.v1beta1.PodSec" "urityPolicyConfig\022\021\n\tself_link\030d \001(\t\022\014\n\004" "zone\030e \001(\t\022\020\n\010endpoint\030f \001(\t\022\037\n\027initial_" "cluster_version\030g \001(\t\022\036\n\026current_master_" "version\030h \001(\t\022\034\n\024current_node_version\030i " "\001(\t\022\023\n\013create_time\030j \001(\t\0228\n\006status\030k \001(\016" "2(.google.container.v1beta1.Cluster.Stat" "us\022\026\n\016status_message\030l \001(\t\022\033\n\023node_ipv4_" "cidr_size\030m \001(\005\022\032\n\022services_ipv4_cidr\030n " "\001(\t\022\033\n\023instance_group_urls\030o \003(\t\022\032\n\022curr" "ent_node_count\030p \001(\005\022\023\n\013expire_time\030q \001(" "\t\022\020\n\010location\030r \001(\t\"i\n\006Status\022\026\n\022STATUS_" "UNSPECIFIED\020\000\022\020\n\014PROVISIONING\020\001\022\013\n\007RUNNI" "NG\020\002\022\017\n\013RECONCILING\020\003\022\014\n\010STOPPING\020\004\022\t\n\005E" "RROR\020\005\"\257\004\n\rClusterUpdate\022\034\n\024desired_node" "_version\030\004 \001(\t\022\"\n\032desired_monitoring_ser" "vice\030\005 \001(\t\022E\n\025desired_addons_config\030\006 \001(" "\0132&.google.container.v1beta1.AddonsConfi" "g\022\034\n\024desired_node_pool_id\030\007 \001(\t\022\032\n\022desir" "ed_image_type\030\010 \001(\t\022T\n\035desired_node_pool" "_autoscaling\030\t \001(\0132-.google.container.v1" "beta1.NodePoolAutoscaling\022\031\n\021desired_loc" "ations\030\n \003(\t\022k\n)desired_master_authorize" "d_networks_config\030\014 \001(\01328.google.contain" "er.v1beta1.MasterAuthorizedNetworksConfi" "g\022]\n\"desired_pod_security_policy_config\030" "\016 \001(\01321.google.container.v1beta1.PodSecu" "rityPolicyConfig\022\036\n\026desired_master_versi" "on\030d \001(\t\"\201\006\n\tOperation\022\014\n\004name\030\001 \001(\t\022\014\n\004" "zone\030\002 \001(\t\022@\n\016operation_type\030\003 \001(\0162(.goo" "gle.container.v1beta1.Operation.Type\022:\n\006" "status\030\004 \001(\0162*.google.container.v1beta1." "Operation.Status\022\016\n\006detail\030\010 \001(\t\022\026\n\016stat" "us_message\030\005 \001(\t\022\021\n\tself_link\030\006 \001(\t\022\023\n\013t" "arget_link\030\007 \001(\t\022\020\n\010location\030\t \001(\t\022\022\n\nst" "art_time\030\n \001(\t\022\020\n\010end_time\030\013 \001(\t\"R\n\006Stat" "us\022\026\n\022STATUS_UNSPECIFIED\020\000\022\013\n\007PENDING\020\001\022" "\013\n\007RUNNING\020\002\022\010\n\004DONE\020\003\022\014\n\010ABORTING\020\004\"\375\002\n" "\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022\022\n\016CREATE_CL" "USTER\020\001\022\022\n\016DELETE_CLUSTER\020\002\022\022\n\016UPGRADE_M" "ASTER\020\003\022\021\n\rUPGRADE_NODES\020\004\022\022\n\016REPAIR_CLU" "STER\020\005\022\022\n\016UPDATE_CLUSTER\020\006\022\024\n\020CREATE_NOD" "E_POOL\020\007\022\024\n\020DELETE_NODE_POOL\020\010\022\034\n\030SET_NO" "DE_POOL_MANAGEMENT\020\t\022\025\n\021AUTO_REPAIR_NODE" "S\020\n\022\026\n\022AUTO_UPGRADE_NODES\020\013\022\016\n\nSET_LABEL" "S\020\014\022\023\n\017SET_MASTER_AUTH\020\r\022\026\n\022SET_NODE_POO" "L_SIZE\020\016\022\026\n\022SET_NETWORK_POLICY\020\017\022\032\n\026SET_" "MAINTENANCE_POLICY\020\020\"|\n\024CreateClusterReq" "uest\022\022\n\nproject_id\030\001 \001(\t\022\014\n\004zone\030\002 \001(\t\0222" "\n\007cluster\030\003 \001(\0132!.google.container.v1bet" "a1.Cluster\022\016\n\006parent\030\005 \001(\t\"W\n\021GetCluster" "Request\022\022\n\nproject_id\030\001 \001(\t\022\014\n\004zone\030\002 \001(" "\t\022\022\n\ncluster_id\030\003 \001(\t\022\014\n\004name\030\005 \001(\t\"\223\001\n\024" "UpdateClusterRequest\022\022\n\nproject_id\030\001 \001(\t" "\022\014\n\004zone\030\002 \001(\t\022\022\n\ncluster_id\030\003 \001(\t\0227\n\006up" "date\030\004 \001(\0132\'.google.container.v1beta1.Cl" "usterUpdate\022\014\n\004name\030\005 \001(\t\"\251\002\n\024SetMasterA" "uthRequest\022\022\n\nproject_id\030\001 \001(\t\022\014\n\004zone\030\002" " \001(\t\022\022\n\ncluster_id\030\003 \001(\t\022E\n\006action\030\004 \001(\016" "25.google.container.v1beta1.SetMasterAut" "hRequest.Action\0224\n\006update\030\005 \001(\0132$.google" ".container.v1beta1.MasterAuth\022\014\n\004name\030\007 " "\001(\t\"P\n\006Action\022\013\n\007UNKNOWN\020\000\022\020\n\014SET_PASSWO" "RD\020\001\022\025\n\021GENERATE_PASSWORD\020\002\022\020\n\014SET_USERN" "AME\020\003\"Z\n\024DeleteClusterRequest\022\022\n\nproject" "_id\030\001 \001(\t\022\014\n\004zone\030\002 \001(\t\022\022\n\ncluster_id\030\003 " "\001(\t\022\014\n\004name\030\004 \001(\t\"G\n\023ListClustersRequest" "\022\022\n\nproject_id\030\001 \001(\t\022\014\n\004zone\030\002 \001(\t\022\016\n\006pa" "rent\030\004 \001(\t\"b\n\024ListClustersResponse\0223\n\010cl" "usters\030\001 \003(\0132!.google.container.v1beta1." "Cluster\022\025\n\rmissing_zones\030\002 \003(\t\"[\n\023GetOpe" "rationRequest\022\022\n\nproject_id\030\001 \001(\t\022\014\n\004zon" "e\030\002 \001(\t\022\024\n\014operation_id\030\003 \001(\t\022\014\n\004name\030\005 " "\001(\t\"I\n\025ListOperationsRequest\022\022\n\nproject_" "id\030\001 \001(\t\022\014\n\004zone\030\002 \001(\t\022\016\n\006parent\030\004 \001(\t\"^" "\n\026CancelOperationRequest\022\022\n\nproject_id\030\001" " \001(\t\022\014\n\004zone\030\002 \001(\t\022\024\n\014operation_id\030\003 \001(\t" "\022\014\n\004name\030\004 \001(\t\"h\n\026ListOperationsResponse" "\0227\n\noperations\030\001 \003(\0132#.google.container." "v1beta1.Operation\022\025\n\rmissing_zones\030\002 \003(\t" "\"H\n\026GetServerConfigRequest\022\022\n\nproject_id" "\030\001 \001(\t\022\014\n\004zone\030\002 \001(\t\022\014\n\004name\030\004 \001(\t\"\242\001\n\014S" "erverConfig\022\037\n\027default_cluster_version\030\001" " \001(\t\022\033\n\023valid_node_versions\030\003 \003(\t\022\032\n\022def" "ault_image_type\030\004 \001(\t\022\031\n\021valid_image_typ" "es\030\005 \003(\t\022\035\n\025valid_master_versions\030\006 \003(\t\"" "\224\001\n\025CreateNodePoolRequest\022\022\n\nproject_id\030" "\001 \001(\t\022\014\n\004zone\030\002 \001(\t\022\022\n\ncluster_id\030\003 \001(\t\022" "5\n\tnode_pool\030\004 \001(\0132\".google.container.v1" "beta1.NodePool\022\016\n\006parent\030\006 \001(\t\"q\n\025Delete" "NodePoolRequest\022\022\n\nproject_id\030\001 \001(\t\022\014\n\004z" "one\030\002 \001(\t\022\022\n\ncluster_id\030\003 \001(\t\022\024\n\014node_po" "ol_id\030\004 \001(\t\022\014\n\004name\030\006 \001(\t\"\\\n\024ListNodePoo" "lsRequest\022\022\n\nproject_id\030\001 \001(\t\022\014\n\004zone\030\002 " "\001(\t\022\022\n\ncluster_id\030\003 \001(\t\022\016\n\006parent\030\005 \001(\t\"" "n\n\022GetNodePoolRequest\022\022\n\nproject_id\030\001 \001(" "\t\022\014\n\004zone\030\002 \001(\t\022\022\n\ncluster_id\030\003 \001(\t\022\024\n\014n" "ode_pool_id\030\004 \001(\t\022\014\n\004name\030\006 \001(\t\"\204\004\n\010Node" "Pool\022\014\n\004name\030\001 \001(\t\0224\n\006config\030\002 \001(\0132$.goo" "gle.container.v1beta1.NodeConfig\022\032\n\022init" "ial_node_count\030\003 \001(\005\022\021\n\tself_link\030d \001(\t\022" "\017\n\007version\030e \001(\t\022\033\n\023instance_group_urls\030" "f \003(\t\0229\n\006status\030g \001(\0162).google.container" ".v1beta1.NodePool.Status\022\026\n\016status_messa" "ge\030h \001(\t\022B\n\013autoscaling\030\004 \001(\0132-.google.c" "ontainer.v1beta1.NodePoolAutoscaling\022<\n\n" "management\030\005 \001(\0132(.google.container.v1be" "ta1.NodeManagement\"\201\001\n\006Status\022\026\n\022STATUS_" "UNSPECIFIED\020\000\022\020\n\014PROVISIONING\020\001\022\013\n\007RUNNI" "NG\020\002\022\026\n\022RUNNING_WITH_ERROR\020\003\022\017\n\013RECONCIL" "ING\020\004\022\014\n\010STOPPING\020\005\022\t\n\005ERROR\020\006\"\202\001\n\016NodeM" "anagement\022\024\n\014auto_upgrade\030\001 \001(\010\022\023\n\013auto_" "repair\030\002 \001(\010\022E\n\017upgrade_options\030\n \001(\0132,." "google.container.v1beta1.AutoUpgradeOpti" "ons\"J\n\022AutoUpgradeOptions\022\037\n\027auto_upgrad" "e_start_time\030\001 \001(\t\022\023\n\013description\030\002 \001(\t\"" "P\n\021MaintenancePolicy\022;\n\006window\030\001 \001(\0132+.g" "oogle.container.v1beta1.MaintenanceWindo" "w\"s\n\021MaintenanceWindow\022T\n\030daily_maintena" "nce_window\030\002 \001(\01320.google.container.v1be" "ta1.DailyMaintenanceWindowH\000B\010\n\006policy\">" "\n\026DailyMaintenanceWindow\022\022\n\nstart_time\030\002" " \001(\t\022\020\n\010duration\030\003 \001(\t\"\266\001\n\034SetNodePoolMa" "nagementRequest\022\022\n\nproject_id\030\001 \001(\t\022\014\n\004z" "one\030\002 \001(\t\022\022\n\ncluster_id\030\003 \001(\t\022\024\n\014node_po" "ol_id\030\004 \001(\t\022<\n\nmanagement\030\005 \001(\0132(.google" ".container.v1beta1.NodeManagement\022\014\n\004nam" "e\030\007 \001(\t\"z\n\036RollbackNodePoolUpgradeReques" "t\022\022\n\nproject_id\030\001 \001(\t\022\014\n\004zone\030\002 \001(\t\022\022\n\nc" "luster_id\030\003 \001(\t\022\024\n\014node_pool_id\030\004 \001(\t\022\014\n" "\004name\030\006 \001(\t\"O\n\025ListNodePoolsResponse\0226\n\n" "node_pools\030\001 \003(\0132\".google.container.v1be" "ta1.NodePool\"V\n\023NodePoolAutoscaling\022\017\n\007e" "nabled\030\001 \001(\010\022\026\n\016min_node_count\030\002 \001(\005\022\026\n\016" "max_node_count\030\003 \001(\005\"\201\002\n\020SetLabelsReques" "t\022\022\n\nproject_id\030\001 \001(\t\022\014\n\004zone\030\002 \001(\t\022\022\n\nc" "luster_id\030\003 \001(\t\022W\n\017resource_labels\030\004 \003(\013" "2>.google.container.v1beta1.SetLabelsReq" "uest.ResourceLabelsEntry\022\031\n\021label_finger" "print\030\005 \001(\t\022\014\n\004name\030\007 \001(\t\0325\n\023ResourceLab" "elsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001" "\"k\n\024SetLegacyAbacRequest\022\022\n\nproject_id\030\001" " \001(\t\022\014\n\004zone\030\002 \001(\t\022\022\n\ncluster_id\030\003 \001(\t\022\017" "\n\007enabled\030\004 \001(\010\022\014\n\004name\030\006 \001(\t\"\\\n\026StartIP" "RotationRequest\022\022\n\nproject_id\030\001 \001(\t\022\014\n\004z" "one\030\002 \001(\t\022\022\n\ncluster_id\030\003 \001(\t\022\014\n\004name\030\006 " "\001(\t\"_\n\031CompleteIPRotationRequest\022\022\n\nproj" "ect_id\030\001 \001(\t\022\014\n\004zone\030\002 \001(\t\022\022\n\ncluster_id" "\030\003 \001(\t\022\014\n\004name\030\007 \001(\t\"H\n\021AcceleratorConfi" "g\022\031\n\021accelerator_count\030\001 \001(\003\022\030\n\020accelera" "tor_type\030\002 \001(\t\"\236\001\n\027SetNetworkPolicyReque" "st\022\022\n\nproject_id\030\001 \001(\t\022\014\n\004zone\030\002 \001(\t\022\022\n\n" "cluster_id\030\003 \001(\t\022\?\n\016network_policy\030\004 \001(\013" "2\'.google.container.v1beta1.NetworkPolic" "y\022\014\n\004name\030\006 \001(\t\"\252\001\n\033SetMaintenancePolicy" "Request\022\022\n\nproject_id\030\001 \001(\t\022\014\n\004zone\030\002 \001(" "\t\022\022\n\ncluster_id\030\003 \001(\t\022G\n\022maintenance_pol" "icy\030\004 \001(\0132+.google.container.v1beta1.Mai" "ntenancePolicy\022\014\n\004name\030\005 \001(\t2\335\036\n\016Cluster" "Manager\022\250\001\n\014ListClusters\022-.google.contai" "ner.v1beta1.ListClustersRequest\032..google" ".container.v1beta1.ListClustersResponse\"" "9\202\323\344\223\0023\0221/v1beta1/{parent=projects/*/loc" "ations/*}/clusters\022\227\001\n\nGetCluster\022+.goog" "le.container.v1beta1.GetClusterRequest\032!" ".google.container.v1beta1.Cluster\"9\202\323\344\223\002" "3\0221/v1beta1/{name=projects/*/locations/*" "/clusters/*}\022\242\001\n\rCreateCluster\022..google." "container.v1beta1.CreateClusterRequest\032#" ".google.container.v1beta1.Operation\"<\202\323\344" "\223\0026\"1/v1beta1/{parent=projects/*/locatio" "ns/*}/clusters:\001*\022\242\001\n\rUpdateCluster\022..go" "ogle.container.v1beta1.UpdateClusterRequ" "est\032#.google.container.v1beta1.Operation" "\"<\202\323\344\223\0026\0321/v1beta1/{name=projects/*/loca" "tions/*/clusters/*}:\001*\022\260\001\n\rSetMasterAuth" "\022..google.container.v1beta1.SetMasterAut" "hRequest\032#.google.container.v1beta1.Oper" "ation\"J\202\323\344\223\002D\"\?/v1beta1/{name=projects/*" "/locations/*/clusters/*}:setMasterAuth:\001" "*\022\237\001\n\rDeleteCluster\022..google.container.v" "1beta1.DeleteClusterRequest\032#.google.con" "tainer.v1beta1.Operation\"9\202\323\344\223\0023*1/v1bet" "a1/{name=projects/*/locations/*/clusters" "/*}\022\260\001\n\016ListOperations\022/.google.containe" "r.v1beta1.ListOperationsRequest\0320.google" ".container.v1beta1.ListOperationsRespons" "e\";\202\323\344\223\0025\0223/v1beta1/{parent=projects/*/l" "ocations/*}/operations\022\237\001\n\014GetOperation\022" "-.google.container.v1beta1.GetOperationR" "equest\032#.google.container.v1beta1.Operat" "ion\";\202\323\344\223\0025\0223/v1beta1/{name=projects/*/l" "ocations/*/operations/*}\022\242\001\n\017CancelOpera" "tion\0220.google.container.v1beta1.CancelOp" "erationRequest\032\026.google.protobuf.Empty\"E" "\202\323\344\223\002\?\":/v1beta1/{name=projects/*/locati" "ons/*/operations/*}:cancel:\001*\022\250\001\n\017GetSer" "verConfig\0220.google.container.v1beta1.Get" "ServerConfigRequest\032&.google.container.v" "1beta1.ServerConfig\";\202\323\344\223\0025\0223/v1beta1/{n" "ame=projects/*/locations/*}/serverConfig" "\022\267\001\n\rListNodePools\022..google.container.v1" "beta1.ListNodePoolsRequest\032/.google.cont" "ainer.v1beta1.ListNodePoolsResponse\"E\202\323\344" "\223\002\?\022=/v1beta1/{parent=projects/*/locatio" "ns/*/clusters/*}/nodePools\022\246\001\n\013GetNodePo" "ol\022,.google.container.v1beta1.GetNodePoo" "lRequest\032\".google.container.v1beta1.Node" "Pool\"E\202\323\344\223\002\?\022=/v1beta1/{name=projects/*/" "locations/*/clusters/*/nodePools/*}\022\260\001\n\016" "CreateNodePool\022/.google.container.v1beta" "1.CreateNodePoolRequest\032#.google.contain" "er.v1beta1.Operation\"H\202\323\344\223\002B\"=/v1beta1/{" "parent=projects/*/locations/*/clusters/*" "}/nodePools:\001*\022\255\001\n\016DeleteNodePool\022/.goog" "le.container.v1beta1.DeleteNodePoolReque" "st\032#.google.container.v1beta1.Operation\"" "E\202\323\344\223\002\?*=/v1beta1/{name=projects/*/locat" "ions/*/clusters/*/nodePools/*}\022\313\001\n\027Rollb" "ackNodePoolUpgrade\0228.google.container.v1" "beta1.RollbackNodePoolUpgradeRequest\032#.g" "oogle.container.v1beta1.Operation\"Q\202\323\344\223\002" "K\"F/v1beta1/{name=projects/*/locations/*" "/clusters/*/nodePools/*}:rollback:\001*\022\314\001\n" "\025SetNodePoolManagement\0226.google.containe" "r.v1beta1.SetNodePoolManagementRequest\032#" ".google.container.v1beta1.Operation\"V\202\323\344" "\223\002P\"K/v1beta1/{name=projects/*/locations" "/*/clusters/*/nodePools/*}:setManagement" ":\001*\022\254\001\n\tSetLabels\022*.google.container.v1b" "eta1.SetLabelsRequest\032#.google.container" ".v1beta1.Operation\"N\202\323\344\223\002H\"C/v1beta1/{na" "me=projects/*/locations/*/clusters/*}:se" "tResourceLabels:\001*\022\260\001\n\rSetLegacyAbac\022..g" "oogle.container.v1beta1.SetLegacyAbacReq" "uest\032#.google.container.v1beta1.Operatio" "n\"J\202\323\344\223\002D\"\?/v1beta1/{name=projects/*/loc" "ations/*/clusters/*}:setLegacyAbac:\001*\022\266\001" "\n\017StartIPRotation\0220.google.container.v1b" "eta1.StartIPRotationRequest\032#.google.con" "tainer.v1beta1.Operation\"L\202\323\344\223\002F\"A/v1bet" "a1/{name=projects/*/locations/*/clusters" "/*}:startIpRotation:\001*\022\277\001\n\022CompleteIPRot" "ation\0223.google.container.v1beta1.Complet" "eIPRotationRequest\032#.google.container.v1" "beta1.Operation\"O\202\323\344\223\002I\"D/v1beta1/{name=" "projects/*/locations/*/clusters/*}:compl" "eteIpRotation:\001*\022\271\001\n\020SetNetworkPolicy\0221." "google.container.v1beta1.SetNetworkPolic" "yRequest\032#.google.container.v1beta1.Oper" "ation\"M\202\323\344\223\002G\"B/v1beta1/{name=projects/*" "/locations/*/clusters/*}:setNetworkPolic" "y:\001*\022\305\001\n\024SetMaintenancePolicy\0225.google.c" "ontainer.v1beta1.SetMaintenancePolicyReq" "uest\032#.google.container.v1beta1.Operatio" "n\"Q\202\323\344\223\002K\"F/v1beta1/{name=projects/*/loc" "ations/*/clusters/*}:setMaintenancePolic" "y:\001*B\272\001\n\034com.google.container.v1beta1B\023C" "lusterServiceProtoP\001ZAgoogle.golang.org/" "genproto/googleapis/container/v1beta1;co" "ntainer\252\002\036Google.Cloud.Container.V1Beta1" "\312\002\036Google\\Cloud\\Container\\V1beta1b\006proto" "3" }; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( descriptor, 13721); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "google/container/v1beta1/cluster_service.proto", &protobuf_RegisterTypes); ::protobuf_google_2fapi_2fannotations_2eproto::AddDescriptors(); ::protobuf_google_2fprotobuf_2fempty_2eproto::AddDescriptors(); } void AddDescriptors() { static ::google::protobuf::internal::once_flag once; ::google::protobuf::internal::call_once(once, AddDescriptorsImpl); } // Force AddDescriptors() to be called at dynamic initialization time. struct StaticDescriptorInitializer { StaticDescriptorInitializer() { AddDescriptors(); } } static_descriptor_initializer; } // namespace protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto namespace google { namespace container { namespace v1beta1 { const ::google::protobuf::EnumDescriptor* NodeTaint_Effect_descriptor() { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_enum_descriptors[0]; } bool NodeTaint_Effect_IsValid(int value) { switch (value) { case 0: case 1: case 2: case 3: return true; default: return false; } } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const NodeTaint_Effect NodeTaint::EFFECT_UNSPECIFIED; const NodeTaint_Effect NodeTaint::NO_SCHEDULE; const NodeTaint_Effect NodeTaint::PREFER_NO_SCHEDULE; const NodeTaint_Effect NodeTaint::NO_EXECUTE; const NodeTaint_Effect NodeTaint::Effect_MIN; const NodeTaint_Effect NodeTaint::Effect_MAX; const int NodeTaint::Effect_ARRAYSIZE; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 const ::google::protobuf::EnumDescriptor* NetworkPolicy_Provider_descriptor() { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_enum_descriptors[1]; } bool NetworkPolicy_Provider_IsValid(int value) { switch (value) { case 0: case 1: return true; default: return false; } } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const NetworkPolicy_Provider NetworkPolicy::PROVIDER_UNSPECIFIED; const NetworkPolicy_Provider NetworkPolicy::CALICO; const NetworkPolicy_Provider NetworkPolicy::Provider_MIN; const NetworkPolicy_Provider NetworkPolicy::Provider_MAX; const int NetworkPolicy::Provider_ARRAYSIZE; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 const ::google::protobuf::EnumDescriptor* Cluster_Status_descriptor() { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_enum_descriptors[2]; } bool Cluster_Status_IsValid(int value) { switch (value) { case 0: case 1: case 2: case 3: case 4: case 5: return true; default: return false; } } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const Cluster_Status Cluster::STATUS_UNSPECIFIED; const Cluster_Status Cluster::PROVISIONING; const Cluster_Status Cluster::RUNNING; const Cluster_Status Cluster::RECONCILING; const Cluster_Status Cluster::STOPPING; const Cluster_Status Cluster::ERROR; const Cluster_Status Cluster::Status_MIN; const Cluster_Status Cluster::Status_MAX; const int Cluster::Status_ARRAYSIZE; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 const ::google::protobuf::EnumDescriptor* Operation_Status_descriptor() { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_enum_descriptors[3]; } bool Operation_Status_IsValid(int value) { switch (value) { case 0: case 1: case 2: case 3: case 4: return true; default: return false; } } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const Operation_Status Operation::STATUS_UNSPECIFIED; const Operation_Status Operation::PENDING; const Operation_Status Operation::RUNNING; const Operation_Status Operation::DONE; const Operation_Status Operation::ABORTING; const Operation_Status Operation::Status_MIN; const Operation_Status Operation::Status_MAX; const int Operation::Status_ARRAYSIZE; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 const ::google::protobuf::EnumDescriptor* Operation_Type_descriptor() { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_enum_descriptors[4]; } bool Operation_Type_IsValid(int value) { switch (value) { case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: case 9: case 10: case 11: case 12: case 13: case 14: case 15: case 16: return true; default: return false; } } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const Operation_Type Operation::TYPE_UNSPECIFIED; const Operation_Type Operation::CREATE_CLUSTER; const Operation_Type Operation::DELETE_CLUSTER; const Operation_Type Operation::UPGRADE_MASTER; const Operation_Type Operation::UPGRADE_NODES; const Operation_Type Operation::REPAIR_CLUSTER; const Operation_Type Operation::UPDATE_CLUSTER; const Operation_Type Operation::CREATE_NODE_POOL; const Operation_Type Operation::DELETE_NODE_POOL; const Operation_Type Operation::SET_NODE_POOL_MANAGEMENT; const Operation_Type Operation::AUTO_REPAIR_NODES; const Operation_Type Operation::AUTO_UPGRADE_NODES; const Operation_Type Operation::SET_LABELS; const Operation_Type Operation::SET_MASTER_AUTH; const Operation_Type Operation::SET_NODE_POOL_SIZE; const Operation_Type Operation::SET_NETWORK_POLICY; const Operation_Type Operation::SET_MAINTENANCE_POLICY; const Operation_Type Operation::Type_MIN; const Operation_Type Operation::Type_MAX; const int Operation::Type_ARRAYSIZE; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 const ::google::protobuf::EnumDescriptor* SetMasterAuthRequest_Action_descriptor() { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_enum_descriptors[5]; } bool SetMasterAuthRequest_Action_IsValid(int value) { switch (value) { case 0: case 1: case 2: case 3: return true; default: return false; } } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const SetMasterAuthRequest_Action SetMasterAuthRequest::UNKNOWN; const SetMasterAuthRequest_Action SetMasterAuthRequest::SET_PASSWORD; const SetMasterAuthRequest_Action SetMasterAuthRequest::GENERATE_PASSWORD; const SetMasterAuthRequest_Action SetMasterAuthRequest::SET_USERNAME; const SetMasterAuthRequest_Action SetMasterAuthRequest::Action_MIN; const SetMasterAuthRequest_Action SetMasterAuthRequest::Action_MAX; const int SetMasterAuthRequest::Action_ARRAYSIZE; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 const ::google::protobuf::EnumDescriptor* NodePool_Status_descriptor() { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_enum_descriptors[6]; } bool NodePool_Status_IsValid(int value) { switch (value) { case 0: case 1: case 2: case 3: case 4: case 5: case 6: return true; default: return false; } } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const NodePool_Status NodePool::STATUS_UNSPECIFIED; const NodePool_Status NodePool::PROVISIONING; const NodePool_Status NodePool::RUNNING; const NodePool_Status NodePool::RUNNING_WITH_ERROR; const NodePool_Status NodePool::RECONCILING; const NodePool_Status NodePool::STOPPING; const NodePool_Status NodePool::ERROR; const NodePool_Status NodePool::Status_MIN; const NodePool_Status NodePool::Status_MAX; const int NodePool::Status_ARRAYSIZE; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 // =================================================================== NodeConfig_MetadataEntry_DoNotUse::NodeConfig_MetadataEntry_DoNotUse() {} NodeConfig_MetadataEntry_DoNotUse::NodeConfig_MetadataEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {} void NodeConfig_MetadataEntry_DoNotUse::MergeFrom(const NodeConfig_MetadataEntry_DoNotUse& other) { MergeFromInternal(other); } ::google::protobuf::Metadata NodeConfig_MetadataEntry_DoNotUse::GetMetadata() const { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[0]; } void NodeConfig_MetadataEntry_DoNotUse::MergeFrom( const ::google::protobuf::Message& other) { ::google::protobuf::Message::MergeFrom(other); } // =================================================================== NodeConfig_LabelsEntry_DoNotUse::NodeConfig_LabelsEntry_DoNotUse() {} NodeConfig_LabelsEntry_DoNotUse::NodeConfig_LabelsEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {} void NodeConfig_LabelsEntry_DoNotUse::MergeFrom(const NodeConfig_LabelsEntry_DoNotUse& other) { MergeFromInternal(other); } ::google::protobuf::Metadata NodeConfig_LabelsEntry_DoNotUse::GetMetadata() const { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[1]; } void NodeConfig_LabelsEntry_DoNotUse::MergeFrom( const ::google::protobuf::Message& other) { ::google::protobuf::Message::MergeFrom(other); } // =================================================================== void NodeConfig::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int NodeConfig::kMachineTypeFieldNumber; const int NodeConfig::kDiskSizeGbFieldNumber; const int NodeConfig::kOauthScopesFieldNumber; const int NodeConfig::kServiceAccountFieldNumber; const int NodeConfig::kMetadataFieldNumber; const int NodeConfig::kImageTypeFieldNumber; const int NodeConfig::kLabelsFieldNumber; const int NodeConfig::kLocalSsdCountFieldNumber; const int NodeConfig::kTagsFieldNumber; const int NodeConfig::kPreemptibleFieldNumber; const int NodeConfig::kAcceleratorsFieldNumber; const int NodeConfig::kMinCpuPlatformFieldNumber; const int NodeConfig::kTaintsFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 NodeConfig::NodeConfig() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_NodeConfig.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.NodeConfig) } NodeConfig::NodeConfig(const NodeConfig& from) : ::google::protobuf::Message(), _internal_metadata_(NULL), oauth_scopes_(from.oauth_scopes_), tags_(from.tags_), accelerators_(from.accelerators_), taints_(from.taints_) { _internal_metadata_.MergeFrom(from._internal_metadata_); metadata_.MergeFrom(from.metadata_); labels_.MergeFrom(from.labels_); machine_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.machine_type().size() > 0) { machine_type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.machine_type_); } image_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.image_type().size() > 0) { image_type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.image_type_); } service_account_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.service_account().size() > 0) { service_account_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.service_account_); } min_cpu_platform_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.min_cpu_platform().size() > 0) { min_cpu_platform_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.min_cpu_platform_); } ::memcpy(&disk_size_gb_, &from.disk_size_gb_, static_cast<size_t>(reinterpret_cast<char*>(&preemptible_) - reinterpret_cast<char*>(&disk_size_gb_)) + sizeof(preemptible_)); // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.NodeConfig) } void NodeConfig::SharedCtor() { machine_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); image_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); service_account_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); min_cpu_platform_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); ::memset(&disk_size_gb_, 0, static_cast<size_t>( reinterpret_cast<char*>(&preemptible_) - reinterpret_cast<char*>(&disk_size_gb_)) + sizeof(preemptible_)); } NodeConfig::~NodeConfig() { // @@protoc_insertion_point(destructor:google.container.v1beta1.NodeConfig) SharedDtor(); } void NodeConfig::SharedDtor() { machine_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); image_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); service_account_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); min_cpu_platform_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } void NodeConfig::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* NodeConfig::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const NodeConfig& NodeConfig::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_NodeConfig.base); return *internal_default_instance(); } void NodeConfig::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.NodeConfig) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; oauth_scopes_.Clear(); metadata_.Clear(); labels_.Clear(); tags_.Clear(); accelerators_.Clear(); taints_.Clear(); machine_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); image_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); service_account_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); min_cpu_platform_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); ::memset(&disk_size_gb_, 0, static_cast<size_t>( reinterpret_cast<char*>(&preemptible_) - reinterpret_cast<char*>(&disk_size_gb_)) + sizeof(preemptible_)); _internal_metadata_.Clear(); } bool NodeConfig::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.NodeConfig) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string machine_type = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_machine_type())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->machine_type().data(), static_cast<int>(this->machine_type().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.NodeConfig.machine_type")); } else { goto handle_unusual; } break; } // int32 disk_size_gb = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &disk_size_gb_))); } else { goto handle_unusual; } break; } // repeated string oauth_scopes = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->add_oauth_scopes())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->oauth_scopes(this->oauth_scopes_size() - 1).data(), static_cast<int>(this->oauth_scopes(this->oauth_scopes_size() - 1).length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.NodeConfig.oauth_scopes")); } else { goto handle_unusual; } break; } // map<string, string> metadata = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { NodeConfig_MetadataEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField< NodeConfig_MetadataEntry_DoNotUse, ::std::string, ::std::string, ::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::google::protobuf::internal::WireFormatLite::TYPE_STRING, 0 >, ::google::protobuf::Map< ::std::string, ::std::string > > parser(&metadata_); DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, &parser)); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( parser.key().data(), static_cast<int>(parser.key().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.NodeConfig.MetadataEntry.key")); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( parser.value().data(), static_cast<int>(parser.value().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.NodeConfig.MetadataEntry.value")); } else { goto handle_unusual; } break; } // string image_type = 5; case 5: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_image_type())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->image_type().data(), static_cast<int>(this->image_type().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.NodeConfig.image_type")); } else { goto handle_unusual; } break; } // map<string, string> labels = 6; case 6: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) { NodeConfig_LabelsEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField< NodeConfig_LabelsEntry_DoNotUse, ::std::string, ::std::string, ::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::google::protobuf::internal::WireFormatLite::TYPE_STRING, 0 >, ::google::protobuf::Map< ::std::string, ::std::string > > parser(&labels_); DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, &parser)); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( parser.key().data(), static_cast<int>(parser.key().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.NodeConfig.LabelsEntry.key")); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( parser.value().data(), static_cast<int>(parser.value().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.NodeConfig.LabelsEntry.value")); } else { goto handle_unusual; } break; } // int32 local_ssd_count = 7; case 7: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(56u /* 56 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &local_ssd_count_))); } else { goto handle_unusual; } break; } // repeated string tags = 8; case 8: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->add_tags())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->tags(this->tags_size() - 1).data(), static_cast<int>(this->tags(this->tags_size() - 1).length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.NodeConfig.tags")); } else { goto handle_unusual; } break; } // string service_account = 9; case 9: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(74u /* 74 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_service_account())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->service_account().data(), static_cast<int>(this->service_account().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.NodeConfig.service_account")); } else { goto handle_unusual; } break; } // bool preemptible = 10; case 10: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(80u /* 80 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( input, &preemptible_))); } else { goto handle_unusual; } break; } // repeated .google.container.v1beta1.AcceleratorConfig accelerators = 11; case 11: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(90u /* 90 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, add_accelerators())); } else { goto handle_unusual; } break; } // string min_cpu_platform = 13; case 13: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(106u /* 106 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_min_cpu_platform())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->min_cpu_platform().data(), static_cast<int>(this->min_cpu_platform().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.NodeConfig.min_cpu_platform")); } else { goto handle_unusual; } break; } // repeated .google.container.v1beta1.NodeTaint taints = 15; case 15: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(122u /* 122 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, add_taints())); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.NodeConfig) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.NodeConfig) return false; #undef DO_ } void NodeConfig::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.NodeConfig) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string machine_type = 1; if (this->machine_type().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->machine_type().data(), static_cast<int>(this->machine_type().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.NodeConfig.machine_type"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->machine_type(), output); } // int32 disk_size_gb = 2; if (this->disk_size_gb() != 0) { ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->disk_size_gb(), output); } // repeated string oauth_scopes = 3; for (int i = 0, n = this->oauth_scopes_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->oauth_scopes(i).data(), static_cast<int>(this->oauth_scopes(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.NodeConfig.oauth_scopes"); ::google::protobuf::internal::WireFormatLite::WriteString( 3, this->oauth_scopes(i), output); } // map<string, string> metadata = 4; if (!this->metadata().empty()) { typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer ConstPtr; typedef ConstPtr SortItem; typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less; struct Utf8Check { static void Check(ConstPtr p) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( p->first.data(), static_cast<int>(p->first.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.NodeConfig.MetadataEntry.key"); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( p->second.data(), static_cast<int>(p->second.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.NodeConfig.MetadataEntry.value"); } }; if (output->IsSerializationDeterministic() && this->metadata().size() > 1) { ::std::unique_ptr<SortItem[]> items( new SortItem[this->metadata().size()]); typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type; size_type n = 0; for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator it = this->metadata().begin(); it != this->metadata().end(); ++it, ++n) { items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); } ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); ::std::unique_ptr<NodeConfig_MetadataEntry_DoNotUse> entry; for (size_type i = 0; i < n; i++) { entry.reset(metadata_.NewEntryWrapper( items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second)); ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 4, *entry, output); Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]); } } else { ::std::unique_ptr<NodeConfig_MetadataEntry_DoNotUse> entry; for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator it = this->metadata().begin(); it != this->metadata().end(); ++it) { entry.reset(metadata_.NewEntryWrapper( it->first, it->second)); ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 4, *entry, output); Utf8Check::Check(&*it); } } } // string image_type = 5; if (this->image_type().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->image_type().data(), static_cast<int>(this->image_type().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.NodeConfig.image_type"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 5, this->image_type(), output); } // map<string, string> labels = 6; if (!this->labels().empty()) { typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer ConstPtr; typedef ConstPtr SortItem; typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less; struct Utf8Check { static void Check(ConstPtr p) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( p->first.data(), static_cast<int>(p->first.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.NodeConfig.LabelsEntry.key"); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( p->second.data(), static_cast<int>(p->second.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.NodeConfig.LabelsEntry.value"); } }; if (output->IsSerializationDeterministic() && this->labels().size() > 1) { ::std::unique_ptr<SortItem[]> items( new SortItem[this->labels().size()]); typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type; size_type n = 0; for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator it = this->labels().begin(); it != this->labels().end(); ++it, ++n) { items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); } ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); ::std::unique_ptr<NodeConfig_LabelsEntry_DoNotUse> entry; for (size_type i = 0; i < n; i++) { entry.reset(labels_.NewEntryWrapper( items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second)); ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 6, *entry, output); Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]); } } else { ::std::unique_ptr<NodeConfig_LabelsEntry_DoNotUse> entry; for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator it = this->labels().begin(); it != this->labels().end(); ++it) { entry.reset(labels_.NewEntryWrapper( it->first, it->second)); ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 6, *entry, output); Utf8Check::Check(&*it); } } } // int32 local_ssd_count = 7; if (this->local_ssd_count() != 0) { ::google::protobuf::internal::WireFormatLite::WriteInt32(7, this->local_ssd_count(), output); } // repeated string tags = 8; for (int i = 0, n = this->tags_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->tags(i).data(), static_cast<int>(this->tags(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.NodeConfig.tags"); ::google::protobuf::internal::WireFormatLite::WriteString( 8, this->tags(i), output); } // string service_account = 9; if (this->service_account().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->service_account().data(), static_cast<int>(this->service_account().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.NodeConfig.service_account"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 9, this->service_account(), output); } // bool preemptible = 10; if (this->preemptible() != 0) { ::google::protobuf::internal::WireFormatLite::WriteBool(10, this->preemptible(), output); } // repeated .google.container.v1beta1.AcceleratorConfig accelerators = 11; for (unsigned int i = 0, n = static_cast<unsigned int>(this->accelerators_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 11, this->accelerators(static_cast<int>(i)), output); } // string min_cpu_platform = 13; if (this->min_cpu_platform().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->min_cpu_platform().data(), static_cast<int>(this->min_cpu_platform().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.NodeConfig.min_cpu_platform"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 13, this->min_cpu_platform(), output); } // repeated .google.container.v1beta1.NodeTaint taints = 15; for (unsigned int i = 0, n = static_cast<unsigned int>(this->taints_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 15, this->taints(static_cast<int>(i)), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.NodeConfig) } ::google::protobuf::uint8* NodeConfig::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.NodeConfig) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string machine_type = 1; if (this->machine_type().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->machine_type().data(), static_cast<int>(this->machine_type().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.NodeConfig.machine_type"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->machine_type(), target); } // int32 disk_size_gb = 2; if (this->disk_size_gb() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->disk_size_gb(), target); } // repeated string oauth_scopes = 3; for (int i = 0, n = this->oauth_scopes_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->oauth_scopes(i).data(), static_cast<int>(this->oauth_scopes(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.NodeConfig.oauth_scopes"); target = ::google::protobuf::internal::WireFormatLite:: WriteStringToArray(3, this->oauth_scopes(i), target); } // map<string, string> metadata = 4; if (!this->metadata().empty()) { typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer ConstPtr; typedef ConstPtr SortItem; typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less; struct Utf8Check { static void Check(ConstPtr p) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( p->first.data(), static_cast<int>(p->first.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.NodeConfig.MetadataEntry.key"); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( p->second.data(), static_cast<int>(p->second.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.NodeConfig.MetadataEntry.value"); } }; if (deterministic && this->metadata().size() > 1) { ::std::unique_ptr<SortItem[]> items( new SortItem[this->metadata().size()]); typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type; size_type n = 0; for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator it = this->metadata().begin(); it != this->metadata().end(); ++it, ++n) { items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); } ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); ::std::unique_ptr<NodeConfig_MetadataEntry_DoNotUse> entry; for (size_type i = 0; i < n; i++) { entry.reset(metadata_.NewEntryWrapper( items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second)); target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageNoVirtualToArray( 4, *entry, deterministic, target); ; Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]); } } else { ::std::unique_ptr<NodeConfig_MetadataEntry_DoNotUse> entry; for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator it = this->metadata().begin(); it != this->metadata().end(); ++it) { entry.reset(metadata_.NewEntryWrapper( it->first, it->second)); target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageNoVirtualToArray( 4, *entry, deterministic, target); ; Utf8Check::Check(&*it); } } } // string image_type = 5; if (this->image_type().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->image_type().data(), static_cast<int>(this->image_type().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.NodeConfig.image_type"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 5, this->image_type(), target); } // map<string, string> labels = 6; if (!this->labels().empty()) { typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer ConstPtr; typedef ConstPtr SortItem; typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less; struct Utf8Check { static void Check(ConstPtr p) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( p->first.data(), static_cast<int>(p->first.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.NodeConfig.LabelsEntry.key"); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( p->second.data(), static_cast<int>(p->second.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.NodeConfig.LabelsEntry.value"); } }; if (deterministic && this->labels().size() > 1) { ::std::unique_ptr<SortItem[]> items( new SortItem[this->labels().size()]); typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type; size_type n = 0; for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator it = this->labels().begin(); it != this->labels().end(); ++it, ++n) { items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); } ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); ::std::unique_ptr<NodeConfig_LabelsEntry_DoNotUse> entry; for (size_type i = 0; i < n; i++) { entry.reset(labels_.NewEntryWrapper( items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second)); target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageNoVirtualToArray( 6, *entry, deterministic, target); ; Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]); } } else { ::std::unique_ptr<NodeConfig_LabelsEntry_DoNotUse> entry; for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator it = this->labels().begin(); it != this->labels().end(); ++it) { entry.reset(labels_.NewEntryWrapper( it->first, it->second)); target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageNoVirtualToArray( 6, *entry, deterministic, target); ; Utf8Check::Check(&*it); } } } // int32 local_ssd_count = 7; if (this->local_ssd_count() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(7, this->local_ssd_count(), target); } // repeated string tags = 8; for (int i = 0, n = this->tags_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->tags(i).data(), static_cast<int>(this->tags(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.NodeConfig.tags"); target = ::google::protobuf::internal::WireFormatLite:: WriteStringToArray(8, this->tags(i), target); } // string service_account = 9; if (this->service_account().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->service_account().data(), static_cast<int>(this->service_account().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.NodeConfig.service_account"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 9, this->service_account(), target); } // bool preemptible = 10; if (this->preemptible() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(10, this->preemptible(), target); } // repeated .google.container.v1beta1.AcceleratorConfig accelerators = 11; for (unsigned int i = 0, n = static_cast<unsigned int>(this->accelerators_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 11, this->accelerators(static_cast<int>(i)), deterministic, target); } // string min_cpu_platform = 13; if (this->min_cpu_platform().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->min_cpu_platform().data(), static_cast<int>(this->min_cpu_platform().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.NodeConfig.min_cpu_platform"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 13, this->min_cpu_platform(), target); } // repeated .google.container.v1beta1.NodeTaint taints = 15; for (unsigned int i = 0, n = static_cast<unsigned int>(this->taints_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 15, this->taints(static_cast<int>(i)), deterministic, target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.NodeConfig) return target; } size_t NodeConfig::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.NodeConfig) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // repeated string oauth_scopes = 3; total_size += 1 * ::google::protobuf::internal::FromIntSize(this->oauth_scopes_size()); for (int i = 0, n = this->oauth_scopes_size(); i < n; i++) { total_size += ::google::protobuf::internal::WireFormatLite::StringSize( this->oauth_scopes(i)); } // map<string, string> metadata = 4; total_size += 1 * ::google::protobuf::internal::FromIntSize(this->metadata_size()); { ::std::unique_ptr<NodeConfig_MetadataEntry_DoNotUse> entry; for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator it = this->metadata().begin(); it != this->metadata().end(); ++it) { entry.reset(metadata_.NewEntryWrapper(it->first, it->second)); total_size += ::google::protobuf::internal::WireFormatLite:: MessageSizeNoVirtual(*entry); } } // map<string, string> labels = 6; total_size += 1 * ::google::protobuf::internal::FromIntSize(this->labels_size()); { ::std::unique_ptr<NodeConfig_LabelsEntry_DoNotUse> entry; for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator it = this->labels().begin(); it != this->labels().end(); ++it) { entry.reset(labels_.NewEntryWrapper(it->first, it->second)); total_size += ::google::protobuf::internal::WireFormatLite:: MessageSizeNoVirtual(*entry); } } // repeated string tags = 8; total_size += 1 * ::google::protobuf::internal::FromIntSize(this->tags_size()); for (int i = 0, n = this->tags_size(); i < n; i++) { total_size += ::google::protobuf::internal::WireFormatLite::StringSize( this->tags(i)); } // repeated .google.container.v1beta1.AcceleratorConfig accelerators = 11; { unsigned int count = static_cast<unsigned int>(this->accelerators_size()); total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSize( this->accelerators(static_cast<int>(i))); } } // repeated .google.container.v1beta1.NodeTaint taints = 15; { unsigned int count = static_cast<unsigned int>(this->taints_size()); total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSize( this->taints(static_cast<int>(i))); } } // string machine_type = 1; if (this->machine_type().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->machine_type()); } // string image_type = 5; if (this->image_type().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->image_type()); } // string service_account = 9; if (this->service_account().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->service_account()); } // string min_cpu_platform = 13; if (this->min_cpu_platform().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->min_cpu_platform()); } // int32 disk_size_gb = 2; if (this->disk_size_gb() != 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( this->disk_size_gb()); } // int32 local_ssd_count = 7; if (this->local_ssd_count() != 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( this->local_ssd_count()); } // bool preemptible = 10; if (this->preemptible() != 0) { total_size += 1 + 1; } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void NodeConfig::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.NodeConfig) GOOGLE_DCHECK_NE(&from, this); const NodeConfig* source = ::google::protobuf::internal::DynamicCastToGenerated<const NodeConfig>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.NodeConfig) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.NodeConfig) MergeFrom(*source); } } void NodeConfig::MergeFrom(const NodeConfig& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.NodeConfig) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; oauth_scopes_.MergeFrom(from.oauth_scopes_); metadata_.MergeFrom(from.metadata_); labels_.MergeFrom(from.labels_); tags_.MergeFrom(from.tags_); accelerators_.MergeFrom(from.accelerators_); taints_.MergeFrom(from.taints_); if (from.machine_type().size() > 0) { machine_type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.machine_type_); } if (from.image_type().size() > 0) { image_type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.image_type_); } if (from.service_account().size() > 0) { service_account_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.service_account_); } if (from.min_cpu_platform().size() > 0) { min_cpu_platform_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.min_cpu_platform_); } if (from.disk_size_gb() != 0) { set_disk_size_gb(from.disk_size_gb()); } if (from.local_ssd_count() != 0) { set_local_ssd_count(from.local_ssd_count()); } if (from.preemptible() != 0) { set_preemptible(from.preemptible()); } } void NodeConfig::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.NodeConfig) if (&from == this) return; Clear(); MergeFrom(from); } void NodeConfig::CopyFrom(const NodeConfig& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.NodeConfig) if (&from == this) return; Clear(); MergeFrom(from); } bool NodeConfig::IsInitialized() const { return true; } void NodeConfig::Swap(NodeConfig* other) { if (other == this) return; InternalSwap(other); } void NodeConfig::InternalSwap(NodeConfig* other) { using std::swap; oauth_scopes_.InternalSwap(CastToBase(&other->oauth_scopes_)); metadata_.Swap(&other->metadata_); labels_.Swap(&other->labels_); tags_.InternalSwap(CastToBase(&other->tags_)); CastToBase(&accelerators_)->InternalSwap(CastToBase(&other->accelerators_)); CastToBase(&taints_)->InternalSwap(CastToBase(&other->taints_)); machine_type_.Swap(&other->machine_type_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); image_type_.Swap(&other->image_type_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); service_account_.Swap(&other->service_account_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); min_cpu_platform_.Swap(&other->min_cpu_platform_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(disk_size_gb_, other->disk_size_gb_); swap(local_ssd_count_, other->local_ssd_count_); swap(preemptible_, other->preemptible_); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata NodeConfig::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void NodeTaint::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int NodeTaint::kKeyFieldNumber; const int NodeTaint::kValueFieldNumber; const int NodeTaint::kEffectFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 NodeTaint::NodeTaint() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_NodeTaint.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.NodeTaint) } NodeTaint::NodeTaint(const NodeTaint& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.key().size() > 0) { key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.key_); } value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.value().size() > 0) { value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_); } effect_ = from.effect_; // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.NodeTaint) } void NodeTaint::SharedCtor() { key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); effect_ = 0; } NodeTaint::~NodeTaint() { // @@protoc_insertion_point(destructor:google.container.v1beta1.NodeTaint) SharedDtor(); } void NodeTaint::SharedDtor() { key_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } void NodeTaint::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* NodeTaint::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const NodeTaint& NodeTaint::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_NodeTaint.base); return *internal_default_instance(); } void NodeTaint::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.NodeTaint) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; key_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); effect_ = 0; _internal_metadata_.Clear(); } bool NodeTaint::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.NodeTaint) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string key = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_key())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->key().data(), static_cast<int>(this->key().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.NodeTaint.key")); } else { goto handle_unusual; } break; } // string value = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_value())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->value().data(), static_cast<int>(this->value().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.NodeTaint.value")); } else { goto handle_unusual; } break; } // .google.container.v1beta1.NodeTaint.Effect effect = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( input, &value))); set_effect(static_cast< ::google::container::v1beta1::NodeTaint_Effect >(value)); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.NodeTaint) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.NodeTaint) return false; #undef DO_ } void NodeTaint::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.NodeTaint) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string key = 1; if (this->key().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->key().data(), static_cast<int>(this->key().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.NodeTaint.key"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->key(), output); } // string value = 2; if (this->value().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->value().data(), static_cast<int>(this->value().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.NodeTaint.value"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->value(), output); } // .google.container.v1beta1.NodeTaint.Effect effect = 3; if (this->effect() != 0) { ::google::protobuf::internal::WireFormatLite::WriteEnum( 3, this->effect(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.NodeTaint) } ::google::protobuf::uint8* NodeTaint::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.NodeTaint) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string key = 1; if (this->key().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->key().data(), static_cast<int>(this->key().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.NodeTaint.key"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->key(), target); } // string value = 2; if (this->value().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->value().data(), static_cast<int>(this->value().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.NodeTaint.value"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->value(), target); } // .google.container.v1beta1.NodeTaint.Effect effect = 3; if (this->effect() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( 3, this->effect(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.NodeTaint) return target; } size_t NodeTaint::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.NodeTaint) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // string key = 1; if (this->key().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->key()); } // string value = 2; if (this->value().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->value()); } // .google.container.v1beta1.NodeTaint.Effect effect = 3; if (this->effect() != 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::EnumSize(this->effect()); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void NodeTaint::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.NodeTaint) GOOGLE_DCHECK_NE(&from, this); const NodeTaint* source = ::google::protobuf::internal::DynamicCastToGenerated<const NodeTaint>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.NodeTaint) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.NodeTaint) MergeFrom(*source); } } void NodeTaint::MergeFrom(const NodeTaint& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.NodeTaint) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.key().size() > 0) { key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.key_); } if (from.value().size() > 0) { value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_); } if (from.effect() != 0) { set_effect(from.effect()); } } void NodeTaint::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.NodeTaint) if (&from == this) return; Clear(); MergeFrom(from); } void NodeTaint::CopyFrom(const NodeTaint& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.NodeTaint) if (&from == this) return; Clear(); MergeFrom(from); } bool NodeTaint::IsInitialized() const { return true; } void NodeTaint::Swap(NodeTaint* other) { if (other == this) return; InternalSwap(other); } void NodeTaint::InternalSwap(NodeTaint* other) { using std::swap; key_.Swap(&other->key_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); value_.Swap(&other->value_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(effect_, other->effect_); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata NodeTaint::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void MasterAuth::InitAsDefaultInstance() { ::google::container::v1beta1::_MasterAuth_default_instance_._instance.get_mutable()->client_certificate_config_ = const_cast< ::google::container::v1beta1::ClientCertificateConfig*>( ::google::container::v1beta1::ClientCertificateConfig::internal_default_instance()); } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int MasterAuth::kUsernameFieldNumber; const int MasterAuth::kPasswordFieldNumber; const int MasterAuth::kClientCertificateConfigFieldNumber; const int MasterAuth::kClusterCaCertificateFieldNumber; const int MasterAuth::kClientCertificateFieldNumber; const int MasterAuth::kClientKeyFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 MasterAuth::MasterAuth() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_MasterAuth.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.MasterAuth) } MasterAuth::MasterAuth(const MasterAuth& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); username_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.username().size() > 0) { username_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.username_); } password_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.password().size() > 0) { password_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.password_); } cluster_ca_certificate_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.cluster_ca_certificate().size() > 0) { cluster_ca_certificate_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cluster_ca_certificate_); } client_certificate_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.client_certificate().size() > 0) { client_certificate_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.client_certificate_); } client_key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.client_key().size() > 0) { client_key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.client_key_); } if (from.has_client_certificate_config()) { client_certificate_config_ = new ::google::container::v1beta1::ClientCertificateConfig(*from.client_certificate_config_); } else { client_certificate_config_ = NULL; } // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.MasterAuth) } void MasterAuth::SharedCtor() { username_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); password_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_ca_certificate_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); client_certificate_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); client_key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); client_certificate_config_ = NULL; } MasterAuth::~MasterAuth() { // @@protoc_insertion_point(destructor:google.container.v1beta1.MasterAuth) SharedDtor(); } void MasterAuth::SharedDtor() { username_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); password_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_ca_certificate_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); client_certificate_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); client_key_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete client_certificate_config_; } void MasterAuth::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* MasterAuth::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const MasterAuth& MasterAuth::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_MasterAuth.base); return *internal_default_instance(); } void MasterAuth::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.MasterAuth) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; username_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); password_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_ca_certificate_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); client_certificate_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); client_key_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (GetArenaNoVirtual() == NULL && client_certificate_config_ != NULL) { delete client_certificate_config_; } client_certificate_config_ = NULL; _internal_metadata_.Clear(); } bool MasterAuth::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.MasterAuth) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string username = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_username())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->username().data(), static_cast<int>(this->username().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.MasterAuth.username")); } else { goto handle_unusual; } break; } // string password = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_password())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->password().data(), static_cast<int>(this->password().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.MasterAuth.password")); } else { goto handle_unusual; } break; } // .google.container.v1beta1.ClientCertificateConfig client_certificate_config = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, mutable_client_certificate_config())); } else { goto handle_unusual; } break; } // string cluster_ca_certificate = 100; case 100: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(34u /* 802 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_cluster_ca_certificate())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_ca_certificate().data(), static_cast<int>(this->cluster_ca_certificate().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.MasterAuth.cluster_ca_certificate")); } else { goto handle_unusual; } break; } // string client_certificate = 101; case 101: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(42u /* 810 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_client_certificate())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->client_certificate().data(), static_cast<int>(this->client_certificate().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.MasterAuth.client_certificate")); } else { goto handle_unusual; } break; } // string client_key = 102; case 102: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(50u /* 818 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_client_key())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->client_key().data(), static_cast<int>(this->client_key().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.MasterAuth.client_key")); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.MasterAuth) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.MasterAuth) return false; #undef DO_ } void MasterAuth::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.MasterAuth) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string username = 1; if (this->username().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->username().data(), static_cast<int>(this->username().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.MasterAuth.username"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->username(), output); } // string password = 2; if (this->password().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->password().data(), static_cast<int>(this->password().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.MasterAuth.password"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->password(), output); } // .google.container.v1beta1.ClientCertificateConfig client_certificate_config = 3; if (this->has_client_certificate_config()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 3, this->_internal_client_certificate_config(), output); } // string cluster_ca_certificate = 100; if (this->cluster_ca_certificate().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_ca_certificate().data(), static_cast<int>(this->cluster_ca_certificate().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.MasterAuth.cluster_ca_certificate"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 100, this->cluster_ca_certificate(), output); } // string client_certificate = 101; if (this->client_certificate().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->client_certificate().data(), static_cast<int>(this->client_certificate().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.MasterAuth.client_certificate"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 101, this->client_certificate(), output); } // string client_key = 102; if (this->client_key().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->client_key().data(), static_cast<int>(this->client_key().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.MasterAuth.client_key"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 102, this->client_key(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.MasterAuth) } ::google::protobuf::uint8* MasterAuth::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.MasterAuth) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string username = 1; if (this->username().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->username().data(), static_cast<int>(this->username().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.MasterAuth.username"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->username(), target); } // string password = 2; if (this->password().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->password().data(), static_cast<int>(this->password().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.MasterAuth.password"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->password(), target); } // .google.container.v1beta1.ClientCertificateConfig client_certificate_config = 3; if (this->has_client_certificate_config()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 3, this->_internal_client_certificate_config(), deterministic, target); } // string cluster_ca_certificate = 100; if (this->cluster_ca_certificate().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_ca_certificate().data(), static_cast<int>(this->cluster_ca_certificate().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.MasterAuth.cluster_ca_certificate"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 100, this->cluster_ca_certificate(), target); } // string client_certificate = 101; if (this->client_certificate().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->client_certificate().data(), static_cast<int>(this->client_certificate().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.MasterAuth.client_certificate"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 101, this->client_certificate(), target); } // string client_key = 102; if (this->client_key().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->client_key().data(), static_cast<int>(this->client_key().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.MasterAuth.client_key"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 102, this->client_key(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.MasterAuth) return target; } size_t MasterAuth::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.MasterAuth) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // string username = 1; if (this->username().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->username()); } // string password = 2; if (this->password().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->password()); } // string cluster_ca_certificate = 100; if (this->cluster_ca_certificate().size() > 0) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( this->cluster_ca_certificate()); } // string client_certificate = 101; if (this->client_certificate().size() > 0) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( this->client_certificate()); } // string client_key = 102; if (this->client_key().size() > 0) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( this->client_key()); } // .google.container.v1beta1.ClientCertificateConfig client_certificate_config = 3; if (this->has_client_certificate_config()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *client_certificate_config_); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void MasterAuth::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.MasterAuth) GOOGLE_DCHECK_NE(&from, this); const MasterAuth* source = ::google::protobuf::internal::DynamicCastToGenerated<const MasterAuth>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.MasterAuth) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.MasterAuth) MergeFrom(*source); } } void MasterAuth::MergeFrom(const MasterAuth& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.MasterAuth) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.username().size() > 0) { username_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.username_); } if (from.password().size() > 0) { password_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.password_); } if (from.cluster_ca_certificate().size() > 0) { cluster_ca_certificate_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cluster_ca_certificate_); } if (from.client_certificate().size() > 0) { client_certificate_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.client_certificate_); } if (from.client_key().size() > 0) { client_key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.client_key_); } if (from.has_client_certificate_config()) { mutable_client_certificate_config()->::google::container::v1beta1::ClientCertificateConfig::MergeFrom(from.client_certificate_config()); } } void MasterAuth::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.MasterAuth) if (&from == this) return; Clear(); MergeFrom(from); } void MasterAuth::CopyFrom(const MasterAuth& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.MasterAuth) if (&from == this) return; Clear(); MergeFrom(from); } bool MasterAuth::IsInitialized() const { return true; } void MasterAuth::Swap(MasterAuth* other) { if (other == this) return; InternalSwap(other); } void MasterAuth::InternalSwap(MasterAuth* other) { using std::swap; username_.Swap(&other->username_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); password_.Swap(&other->password_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); cluster_ca_certificate_.Swap(&other->cluster_ca_certificate_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); client_certificate_.Swap(&other->client_certificate_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); client_key_.Swap(&other->client_key_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(client_certificate_config_, other->client_certificate_config_); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata MasterAuth::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void ClientCertificateConfig::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int ClientCertificateConfig::kIssueClientCertificateFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 ClientCertificateConfig::ClientCertificateConfig() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_ClientCertificateConfig.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.ClientCertificateConfig) } ClientCertificateConfig::ClientCertificateConfig(const ClientCertificateConfig& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); issue_client_certificate_ = from.issue_client_certificate_; // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.ClientCertificateConfig) } void ClientCertificateConfig::SharedCtor() { issue_client_certificate_ = false; } ClientCertificateConfig::~ClientCertificateConfig() { // @@protoc_insertion_point(destructor:google.container.v1beta1.ClientCertificateConfig) SharedDtor(); } void ClientCertificateConfig::SharedDtor() { } void ClientCertificateConfig::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* ClientCertificateConfig::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const ClientCertificateConfig& ClientCertificateConfig::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_ClientCertificateConfig.base); return *internal_default_instance(); } void ClientCertificateConfig::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.ClientCertificateConfig) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; issue_client_certificate_ = false; _internal_metadata_.Clear(); } bool ClientCertificateConfig::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.ClientCertificateConfig) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // bool issue_client_certificate = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( input, &issue_client_certificate_))); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.ClientCertificateConfig) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.ClientCertificateConfig) return false; #undef DO_ } void ClientCertificateConfig::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.ClientCertificateConfig) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // bool issue_client_certificate = 1; if (this->issue_client_certificate() != 0) { ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->issue_client_certificate(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.ClientCertificateConfig) } ::google::protobuf::uint8* ClientCertificateConfig::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.ClientCertificateConfig) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // bool issue_client_certificate = 1; if (this->issue_client_certificate() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->issue_client_certificate(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.ClientCertificateConfig) return target; } size_t ClientCertificateConfig::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.ClientCertificateConfig) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // bool issue_client_certificate = 1; if (this->issue_client_certificate() != 0) { total_size += 1 + 1; } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void ClientCertificateConfig::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.ClientCertificateConfig) GOOGLE_DCHECK_NE(&from, this); const ClientCertificateConfig* source = ::google::protobuf::internal::DynamicCastToGenerated<const ClientCertificateConfig>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.ClientCertificateConfig) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.ClientCertificateConfig) MergeFrom(*source); } } void ClientCertificateConfig::MergeFrom(const ClientCertificateConfig& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.ClientCertificateConfig) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.issue_client_certificate() != 0) { set_issue_client_certificate(from.issue_client_certificate()); } } void ClientCertificateConfig::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.ClientCertificateConfig) if (&from == this) return; Clear(); MergeFrom(from); } void ClientCertificateConfig::CopyFrom(const ClientCertificateConfig& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.ClientCertificateConfig) if (&from == this) return; Clear(); MergeFrom(from); } bool ClientCertificateConfig::IsInitialized() const { return true; } void ClientCertificateConfig::Swap(ClientCertificateConfig* other) { if (other == this) return; InternalSwap(other); } void ClientCertificateConfig::InternalSwap(ClientCertificateConfig* other) { using std::swap; swap(issue_client_certificate_, other->issue_client_certificate_); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata ClientCertificateConfig::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void AddonsConfig::InitAsDefaultInstance() { ::google::container::v1beta1::_AddonsConfig_default_instance_._instance.get_mutable()->http_load_balancing_ = const_cast< ::google::container::v1beta1::HttpLoadBalancing*>( ::google::container::v1beta1::HttpLoadBalancing::internal_default_instance()); ::google::container::v1beta1::_AddonsConfig_default_instance_._instance.get_mutable()->horizontal_pod_autoscaling_ = const_cast< ::google::container::v1beta1::HorizontalPodAutoscaling*>( ::google::container::v1beta1::HorizontalPodAutoscaling::internal_default_instance()); ::google::container::v1beta1::_AddonsConfig_default_instance_._instance.get_mutable()->kubernetes_dashboard_ = const_cast< ::google::container::v1beta1::KubernetesDashboard*>( ::google::container::v1beta1::KubernetesDashboard::internal_default_instance()); ::google::container::v1beta1::_AddonsConfig_default_instance_._instance.get_mutable()->network_policy_config_ = const_cast< ::google::container::v1beta1::NetworkPolicyConfig*>( ::google::container::v1beta1::NetworkPolicyConfig::internal_default_instance()); } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int AddonsConfig::kHttpLoadBalancingFieldNumber; const int AddonsConfig::kHorizontalPodAutoscalingFieldNumber; const int AddonsConfig::kKubernetesDashboardFieldNumber; const int AddonsConfig::kNetworkPolicyConfigFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 AddonsConfig::AddonsConfig() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_AddonsConfig.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.AddonsConfig) } AddonsConfig::AddonsConfig(const AddonsConfig& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); if (from.has_http_load_balancing()) { http_load_balancing_ = new ::google::container::v1beta1::HttpLoadBalancing(*from.http_load_balancing_); } else { http_load_balancing_ = NULL; } if (from.has_horizontal_pod_autoscaling()) { horizontal_pod_autoscaling_ = new ::google::container::v1beta1::HorizontalPodAutoscaling(*from.horizontal_pod_autoscaling_); } else { horizontal_pod_autoscaling_ = NULL; } if (from.has_kubernetes_dashboard()) { kubernetes_dashboard_ = new ::google::container::v1beta1::KubernetesDashboard(*from.kubernetes_dashboard_); } else { kubernetes_dashboard_ = NULL; } if (from.has_network_policy_config()) { network_policy_config_ = new ::google::container::v1beta1::NetworkPolicyConfig(*from.network_policy_config_); } else { network_policy_config_ = NULL; } // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.AddonsConfig) } void AddonsConfig::SharedCtor() { ::memset(&http_load_balancing_, 0, static_cast<size_t>( reinterpret_cast<char*>(&network_policy_config_) - reinterpret_cast<char*>(&http_load_balancing_)) + sizeof(network_policy_config_)); } AddonsConfig::~AddonsConfig() { // @@protoc_insertion_point(destructor:google.container.v1beta1.AddonsConfig) SharedDtor(); } void AddonsConfig::SharedDtor() { if (this != internal_default_instance()) delete http_load_balancing_; if (this != internal_default_instance()) delete horizontal_pod_autoscaling_; if (this != internal_default_instance()) delete kubernetes_dashboard_; if (this != internal_default_instance()) delete network_policy_config_; } void AddonsConfig::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* AddonsConfig::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const AddonsConfig& AddonsConfig::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_AddonsConfig.base); return *internal_default_instance(); } void AddonsConfig::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.AddonsConfig) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; if (GetArenaNoVirtual() == NULL && http_load_balancing_ != NULL) { delete http_load_balancing_; } http_load_balancing_ = NULL; if (GetArenaNoVirtual() == NULL && horizontal_pod_autoscaling_ != NULL) { delete horizontal_pod_autoscaling_; } horizontal_pod_autoscaling_ = NULL; if (GetArenaNoVirtual() == NULL && kubernetes_dashboard_ != NULL) { delete kubernetes_dashboard_; } kubernetes_dashboard_ = NULL; if (GetArenaNoVirtual() == NULL && network_policy_config_ != NULL) { delete network_policy_config_; } network_policy_config_ = NULL; _internal_metadata_.Clear(); } bool AddonsConfig::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.AddonsConfig) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // .google.container.v1beta1.HttpLoadBalancing http_load_balancing = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, mutable_http_load_balancing())); } else { goto handle_unusual; } break; } // .google.container.v1beta1.HorizontalPodAutoscaling horizontal_pod_autoscaling = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, mutable_horizontal_pod_autoscaling())); } else { goto handle_unusual; } break; } // .google.container.v1beta1.KubernetesDashboard kubernetes_dashboard = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, mutable_kubernetes_dashboard())); } else { goto handle_unusual; } break; } // .google.container.v1beta1.NetworkPolicyConfig network_policy_config = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, mutable_network_policy_config())); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.AddonsConfig) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.AddonsConfig) return false; #undef DO_ } void AddonsConfig::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.AddonsConfig) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // .google.container.v1beta1.HttpLoadBalancing http_load_balancing = 1; if (this->has_http_load_balancing()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 1, this->_internal_http_load_balancing(), output); } // .google.container.v1beta1.HorizontalPodAutoscaling horizontal_pod_autoscaling = 2; if (this->has_horizontal_pod_autoscaling()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 2, this->_internal_horizontal_pod_autoscaling(), output); } // .google.container.v1beta1.KubernetesDashboard kubernetes_dashboard = 3; if (this->has_kubernetes_dashboard()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 3, this->_internal_kubernetes_dashboard(), output); } // .google.container.v1beta1.NetworkPolicyConfig network_policy_config = 4; if (this->has_network_policy_config()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 4, this->_internal_network_policy_config(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.AddonsConfig) } ::google::protobuf::uint8* AddonsConfig::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.AddonsConfig) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // .google.container.v1beta1.HttpLoadBalancing http_load_balancing = 1; if (this->has_http_load_balancing()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 1, this->_internal_http_load_balancing(), deterministic, target); } // .google.container.v1beta1.HorizontalPodAutoscaling horizontal_pod_autoscaling = 2; if (this->has_horizontal_pod_autoscaling()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 2, this->_internal_horizontal_pod_autoscaling(), deterministic, target); } // .google.container.v1beta1.KubernetesDashboard kubernetes_dashboard = 3; if (this->has_kubernetes_dashboard()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 3, this->_internal_kubernetes_dashboard(), deterministic, target); } // .google.container.v1beta1.NetworkPolicyConfig network_policy_config = 4; if (this->has_network_policy_config()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 4, this->_internal_network_policy_config(), deterministic, target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.AddonsConfig) return target; } size_t AddonsConfig::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.AddonsConfig) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // .google.container.v1beta1.HttpLoadBalancing http_load_balancing = 1; if (this->has_http_load_balancing()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *http_load_balancing_); } // .google.container.v1beta1.HorizontalPodAutoscaling horizontal_pod_autoscaling = 2; if (this->has_horizontal_pod_autoscaling()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *horizontal_pod_autoscaling_); } // .google.container.v1beta1.KubernetesDashboard kubernetes_dashboard = 3; if (this->has_kubernetes_dashboard()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *kubernetes_dashboard_); } // .google.container.v1beta1.NetworkPolicyConfig network_policy_config = 4; if (this->has_network_policy_config()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *network_policy_config_); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void AddonsConfig::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.AddonsConfig) GOOGLE_DCHECK_NE(&from, this); const AddonsConfig* source = ::google::protobuf::internal::DynamicCastToGenerated<const AddonsConfig>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.AddonsConfig) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.AddonsConfig) MergeFrom(*source); } } void AddonsConfig::MergeFrom(const AddonsConfig& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.AddonsConfig) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.has_http_load_balancing()) { mutable_http_load_balancing()->::google::container::v1beta1::HttpLoadBalancing::MergeFrom(from.http_load_balancing()); } if (from.has_horizontal_pod_autoscaling()) { mutable_horizontal_pod_autoscaling()->::google::container::v1beta1::HorizontalPodAutoscaling::MergeFrom(from.horizontal_pod_autoscaling()); } if (from.has_kubernetes_dashboard()) { mutable_kubernetes_dashboard()->::google::container::v1beta1::KubernetesDashboard::MergeFrom(from.kubernetes_dashboard()); } if (from.has_network_policy_config()) { mutable_network_policy_config()->::google::container::v1beta1::NetworkPolicyConfig::MergeFrom(from.network_policy_config()); } } void AddonsConfig::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.AddonsConfig) if (&from == this) return; Clear(); MergeFrom(from); } void AddonsConfig::CopyFrom(const AddonsConfig& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.AddonsConfig) if (&from == this) return; Clear(); MergeFrom(from); } bool AddonsConfig::IsInitialized() const { return true; } void AddonsConfig::Swap(AddonsConfig* other) { if (other == this) return; InternalSwap(other); } void AddonsConfig::InternalSwap(AddonsConfig* other) { using std::swap; swap(http_load_balancing_, other->http_load_balancing_); swap(horizontal_pod_autoscaling_, other->horizontal_pod_autoscaling_); swap(kubernetes_dashboard_, other->kubernetes_dashboard_); swap(network_policy_config_, other->network_policy_config_); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata AddonsConfig::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void HttpLoadBalancing::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int HttpLoadBalancing::kDisabledFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 HttpLoadBalancing::HttpLoadBalancing() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_HttpLoadBalancing.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.HttpLoadBalancing) } HttpLoadBalancing::HttpLoadBalancing(const HttpLoadBalancing& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); disabled_ = from.disabled_; // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.HttpLoadBalancing) } void HttpLoadBalancing::SharedCtor() { disabled_ = false; } HttpLoadBalancing::~HttpLoadBalancing() { // @@protoc_insertion_point(destructor:google.container.v1beta1.HttpLoadBalancing) SharedDtor(); } void HttpLoadBalancing::SharedDtor() { } void HttpLoadBalancing::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* HttpLoadBalancing::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const HttpLoadBalancing& HttpLoadBalancing::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_HttpLoadBalancing.base); return *internal_default_instance(); } void HttpLoadBalancing::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.HttpLoadBalancing) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; disabled_ = false; _internal_metadata_.Clear(); } bool HttpLoadBalancing::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.HttpLoadBalancing) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // bool disabled = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( input, &disabled_))); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.HttpLoadBalancing) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.HttpLoadBalancing) return false; #undef DO_ } void HttpLoadBalancing::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.HttpLoadBalancing) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // bool disabled = 1; if (this->disabled() != 0) { ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->disabled(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.HttpLoadBalancing) } ::google::protobuf::uint8* HttpLoadBalancing::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.HttpLoadBalancing) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // bool disabled = 1; if (this->disabled() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->disabled(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.HttpLoadBalancing) return target; } size_t HttpLoadBalancing::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.HttpLoadBalancing) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // bool disabled = 1; if (this->disabled() != 0) { total_size += 1 + 1; } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void HttpLoadBalancing::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.HttpLoadBalancing) GOOGLE_DCHECK_NE(&from, this); const HttpLoadBalancing* source = ::google::protobuf::internal::DynamicCastToGenerated<const HttpLoadBalancing>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.HttpLoadBalancing) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.HttpLoadBalancing) MergeFrom(*source); } } void HttpLoadBalancing::MergeFrom(const HttpLoadBalancing& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.HttpLoadBalancing) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.disabled() != 0) { set_disabled(from.disabled()); } } void HttpLoadBalancing::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.HttpLoadBalancing) if (&from == this) return; Clear(); MergeFrom(from); } void HttpLoadBalancing::CopyFrom(const HttpLoadBalancing& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.HttpLoadBalancing) if (&from == this) return; Clear(); MergeFrom(from); } bool HttpLoadBalancing::IsInitialized() const { return true; } void HttpLoadBalancing::Swap(HttpLoadBalancing* other) { if (other == this) return; InternalSwap(other); } void HttpLoadBalancing::InternalSwap(HttpLoadBalancing* other) { using std::swap; swap(disabled_, other->disabled_); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata HttpLoadBalancing::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void HorizontalPodAutoscaling::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int HorizontalPodAutoscaling::kDisabledFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 HorizontalPodAutoscaling::HorizontalPodAutoscaling() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_HorizontalPodAutoscaling.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.HorizontalPodAutoscaling) } HorizontalPodAutoscaling::HorizontalPodAutoscaling(const HorizontalPodAutoscaling& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); disabled_ = from.disabled_; // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.HorizontalPodAutoscaling) } void HorizontalPodAutoscaling::SharedCtor() { disabled_ = false; } HorizontalPodAutoscaling::~HorizontalPodAutoscaling() { // @@protoc_insertion_point(destructor:google.container.v1beta1.HorizontalPodAutoscaling) SharedDtor(); } void HorizontalPodAutoscaling::SharedDtor() { } void HorizontalPodAutoscaling::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* HorizontalPodAutoscaling::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const HorizontalPodAutoscaling& HorizontalPodAutoscaling::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_HorizontalPodAutoscaling.base); return *internal_default_instance(); } void HorizontalPodAutoscaling::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.HorizontalPodAutoscaling) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; disabled_ = false; _internal_metadata_.Clear(); } bool HorizontalPodAutoscaling::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.HorizontalPodAutoscaling) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // bool disabled = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( input, &disabled_))); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.HorizontalPodAutoscaling) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.HorizontalPodAutoscaling) return false; #undef DO_ } void HorizontalPodAutoscaling::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.HorizontalPodAutoscaling) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // bool disabled = 1; if (this->disabled() != 0) { ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->disabled(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.HorizontalPodAutoscaling) } ::google::protobuf::uint8* HorizontalPodAutoscaling::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.HorizontalPodAutoscaling) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // bool disabled = 1; if (this->disabled() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->disabled(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.HorizontalPodAutoscaling) return target; } size_t HorizontalPodAutoscaling::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.HorizontalPodAutoscaling) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // bool disabled = 1; if (this->disabled() != 0) { total_size += 1 + 1; } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void HorizontalPodAutoscaling::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.HorizontalPodAutoscaling) GOOGLE_DCHECK_NE(&from, this); const HorizontalPodAutoscaling* source = ::google::protobuf::internal::DynamicCastToGenerated<const HorizontalPodAutoscaling>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.HorizontalPodAutoscaling) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.HorizontalPodAutoscaling) MergeFrom(*source); } } void HorizontalPodAutoscaling::MergeFrom(const HorizontalPodAutoscaling& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.HorizontalPodAutoscaling) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.disabled() != 0) { set_disabled(from.disabled()); } } void HorizontalPodAutoscaling::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.HorizontalPodAutoscaling) if (&from == this) return; Clear(); MergeFrom(from); } void HorizontalPodAutoscaling::CopyFrom(const HorizontalPodAutoscaling& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.HorizontalPodAutoscaling) if (&from == this) return; Clear(); MergeFrom(from); } bool HorizontalPodAutoscaling::IsInitialized() const { return true; } void HorizontalPodAutoscaling::Swap(HorizontalPodAutoscaling* other) { if (other == this) return; InternalSwap(other); } void HorizontalPodAutoscaling::InternalSwap(HorizontalPodAutoscaling* other) { using std::swap; swap(disabled_, other->disabled_); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata HorizontalPodAutoscaling::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void KubernetesDashboard::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int KubernetesDashboard::kDisabledFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 KubernetesDashboard::KubernetesDashboard() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_KubernetesDashboard.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.KubernetesDashboard) } KubernetesDashboard::KubernetesDashboard(const KubernetesDashboard& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); disabled_ = from.disabled_; // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.KubernetesDashboard) } void KubernetesDashboard::SharedCtor() { disabled_ = false; } KubernetesDashboard::~KubernetesDashboard() { // @@protoc_insertion_point(destructor:google.container.v1beta1.KubernetesDashboard) SharedDtor(); } void KubernetesDashboard::SharedDtor() { } void KubernetesDashboard::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* KubernetesDashboard::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const KubernetesDashboard& KubernetesDashboard::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_KubernetesDashboard.base); return *internal_default_instance(); } void KubernetesDashboard::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.KubernetesDashboard) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; disabled_ = false; _internal_metadata_.Clear(); } bool KubernetesDashboard::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.KubernetesDashboard) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // bool disabled = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( input, &disabled_))); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.KubernetesDashboard) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.KubernetesDashboard) return false; #undef DO_ } void KubernetesDashboard::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.KubernetesDashboard) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // bool disabled = 1; if (this->disabled() != 0) { ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->disabled(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.KubernetesDashboard) } ::google::protobuf::uint8* KubernetesDashboard::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.KubernetesDashboard) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // bool disabled = 1; if (this->disabled() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->disabled(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.KubernetesDashboard) return target; } size_t KubernetesDashboard::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.KubernetesDashboard) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // bool disabled = 1; if (this->disabled() != 0) { total_size += 1 + 1; } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void KubernetesDashboard::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.KubernetesDashboard) GOOGLE_DCHECK_NE(&from, this); const KubernetesDashboard* source = ::google::protobuf::internal::DynamicCastToGenerated<const KubernetesDashboard>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.KubernetesDashboard) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.KubernetesDashboard) MergeFrom(*source); } } void KubernetesDashboard::MergeFrom(const KubernetesDashboard& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.KubernetesDashboard) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.disabled() != 0) { set_disabled(from.disabled()); } } void KubernetesDashboard::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.KubernetesDashboard) if (&from == this) return; Clear(); MergeFrom(from); } void KubernetesDashboard::CopyFrom(const KubernetesDashboard& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.KubernetesDashboard) if (&from == this) return; Clear(); MergeFrom(from); } bool KubernetesDashboard::IsInitialized() const { return true; } void KubernetesDashboard::Swap(KubernetesDashboard* other) { if (other == this) return; InternalSwap(other); } void KubernetesDashboard::InternalSwap(KubernetesDashboard* other) { using std::swap; swap(disabled_, other->disabled_); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata KubernetesDashboard::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void NetworkPolicyConfig::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int NetworkPolicyConfig::kDisabledFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 NetworkPolicyConfig::NetworkPolicyConfig() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_NetworkPolicyConfig.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.NetworkPolicyConfig) } NetworkPolicyConfig::NetworkPolicyConfig(const NetworkPolicyConfig& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); disabled_ = from.disabled_; // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.NetworkPolicyConfig) } void NetworkPolicyConfig::SharedCtor() { disabled_ = false; } NetworkPolicyConfig::~NetworkPolicyConfig() { // @@protoc_insertion_point(destructor:google.container.v1beta1.NetworkPolicyConfig) SharedDtor(); } void NetworkPolicyConfig::SharedDtor() { } void NetworkPolicyConfig::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* NetworkPolicyConfig::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const NetworkPolicyConfig& NetworkPolicyConfig::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_NetworkPolicyConfig.base); return *internal_default_instance(); } void NetworkPolicyConfig::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.NetworkPolicyConfig) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; disabled_ = false; _internal_metadata_.Clear(); } bool NetworkPolicyConfig::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.NetworkPolicyConfig) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // bool disabled = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( input, &disabled_))); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.NetworkPolicyConfig) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.NetworkPolicyConfig) return false; #undef DO_ } void NetworkPolicyConfig::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.NetworkPolicyConfig) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // bool disabled = 1; if (this->disabled() != 0) { ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->disabled(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.NetworkPolicyConfig) } ::google::protobuf::uint8* NetworkPolicyConfig::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.NetworkPolicyConfig) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // bool disabled = 1; if (this->disabled() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->disabled(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.NetworkPolicyConfig) return target; } size_t NetworkPolicyConfig::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.NetworkPolicyConfig) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // bool disabled = 1; if (this->disabled() != 0) { total_size += 1 + 1; } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void NetworkPolicyConfig::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.NetworkPolicyConfig) GOOGLE_DCHECK_NE(&from, this); const NetworkPolicyConfig* source = ::google::protobuf::internal::DynamicCastToGenerated<const NetworkPolicyConfig>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.NetworkPolicyConfig) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.NetworkPolicyConfig) MergeFrom(*source); } } void NetworkPolicyConfig::MergeFrom(const NetworkPolicyConfig& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.NetworkPolicyConfig) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.disabled() != 0) { set_disabled(from.disabled()); } } void NetworkPolicyConfig::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.NetworkPolicyConfig) if (&from == this) return; Clear(); MergeFrom(from); } void NetworkPolicyConfig::CopyFrom(const NetworkPolicyConfig& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.NetworkPolicyConfig) if (&from == this) return; Clear(); MergeFrom(from); } bool NetworkPolicyConfig::IsInitialized() const { return true; } void NetworkPolicyConfig::Swap(NetworkPolicyConfig* other) { if (other == this) return; InternalSwap(other); } void NetworkPolicyConfig::InternalSwap(NetworkPolicyConfig* other) { using std::swap; swap(disabled_, other->disabled_); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata NetworkPolicyConfig::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void MasterAuthorizedNetworksConfig_CidrBlock::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int MasterAuthorizedNetworksConfig_CidrBlock::kDisplayNameFieldNumber; const int MasterAuthorizedNetworksConfig_CidrBlock::kCidrBlockFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 MasterAuthorizedNetworksConfig_CidrBlock::MasterAuthorizedNetworksConfig_CidrBlock() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_MasterAuthorizedNetworksConfig_CidrBlock.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock) } MasterAuthorizedNetworksConfig_CidrBlock::MasterAuthorizedNetworksConfig_CidrBlock(const MasterAuthorizedNetworksConfig_CidrBlock& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); display_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.display_name().size() > 0) { display_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.display_name_); } cidr_block_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.cidr_block().size() > 0) { cidr_block_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cidr_block_); } // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock) } void MasterAuthorizedNetworksConfig_CidrBlock::SharedCtor() { display_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cidr_block_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } MasterAuthorizedNetworksConfig_CidrBlock::~MasterAuthorizedNetworksConfig_CidrBlock() { // @@protoc_insertion_point(destructor:google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock) SharedDtor(); } void MasterAuthorizedNetworksConfig_CidrBlock::SharedDtor() { display_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cidr_block_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } void MasterAuthorizedNetworksConfig_CidrBlock::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* MasterAuthorizedNetworksConfig_CidrBlock::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const MasterAuthorizedNetworksConfig_CidrBlock& MasterAuthorizedNetworksConfig_CidrBlock::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_MasterAuthorizedNetworksConfig_CidrBlock.base); return *internal_default_instance(); } void MasterAuthorizedNetworksConfig_CidrBlock::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; display_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cidr_block_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); _internal_metadata_.Clear(); } bool MasterAuthorizedNetworksConfig_CidrBlock::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string display_name = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_display_name())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->display_name().data(), static_cast<int>(this->display_name().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock.display_name")); } else { goto handle_unusual; } break; } // string cidr_block = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_cidr_block())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cidr_block().data(), static_cast<int>(this->cidr_block().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock.cidr_block")); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock) return false; #undef DO_ } void MasterAuthorizedNetworksConfig_CidrBlock::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string display_name = 1; if (this->display_name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->display_name().data(), static_cast<int>(this->display_name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock.display_name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->display_name(), output); } // string cidr_block = 2; if (this->cidr_block().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cidr_block().data(), static_cast<int>(this->cidr_block().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock.cidr_block"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->cidr_block(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock) } ::google::protobuf::uint8* MasterAuthorizedNetworksConfig_CidrBlock::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string display_name = 1; if (this->display_name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->display_name().data(), static_cast<int>(this->display_name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock.display_name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->display_name(), target); } // string cidr_block = 2; if (this->cidr_block().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cidr_block().data(), static_cast<int>(this->cidr_block().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock.cidr_block"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->cidr_block(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock) return target; } size_t MasterAuthorizedNetworksConfig_CidrBlock::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // string display_name = 1; if (this->display_name().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->display_name()); } // string cidr_block = 2; if (this->cidr_block().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->cidr_block()); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void MasterAuthorizedNetworksConfig_CidrBlock::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock) GOOGLE_DCHECK_NE(&from, this); const MasterAuthorizedNetworksConfig_CidrBlock* source = ::google::protobuf::internal::DynamicCastToGenerated<const MasterAuthorizedNetworksConfig_CidrBlock>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock) MergeFrom(*source); } } void MasterAuthorizedNetworksConfig_CidrBlock::MergeFrom(const MasterAuthorizedNetworksConfig_CidrBlock& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.display_name().size() > 0) { display_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.display_name_); } if (from.cidr_block().size() > 0) { cidr_block_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cidr_block_); } } void MasterAuthorizedNetworksConfig_CidrBlock::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock) if (&from == this) return; Clear(); MergeFrom(from); } void MasterAuthorizedNetworksConfig_CidrBlock::CopyFrom(const MasterAuthorizedNetworksConfig_CidrBlock& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock) if (&from == this) return; Clear(); MergeFrom(from); } bool MasterAuthorizedNetworksConfig_CidrBlock::IsInitialized() const { return true; } void MasterAuthorizedNetworksConfig_CidrBlock::Swap(MasterAuthorizedNetworksConfig_CidrBlock* other) { if (other == this) return; InternalSwap(other); } void MasterAuthorizedNetworksConfig_CidrBlock::InternalSwap(MasterAuthorizedNetworksConfig_CidrBlock* other) { using std::swap; display_name_.Swap(&other->display_name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); cidr_block_.Swap(&other->cidr_block_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata MasterAuthorizedNetworksConfig_CidrBlock::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void MasterAuthorizedNetworksConfig::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int MasterAuthorizedNetworksConfig::kEnabledFieldNumber; const int MasterAuthorizedNetworksConfig::kCidrBlocksFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 MasterAuthorizedNetworksConfig::MasterAuthorizedNetworksConfig() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_MasterAuthorizedNetworksConfig.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.MasterAuthorizedNetworksConfig) } MasterAuthorizedNetworksConfig::MasterAuthorizedNetworksConfig(const MasterAuthorizedNetworksConfig& from) : ::google::protobuf::Message(), _internal_metadata_(NULL), cidr_blocks_(from.cidr_blocks_) { _internal_metadata_.MergeFrom(from._internal_metadata_); enabled_ = from.enabled_; // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.MasterAuthorizedNetworksConfig) } void MasterAuthorizedNetworksConfig::SharedCtor() { enabled_ = false; } MasterAuthorizedNetworksConfig::~MasterAuthorizedNetworksConfig() { // @@protoc_insertion_point(destructor:google.container.v1beta1.MasterAuthorizedNetworksConfig) SharedDtor(); } void MasterAuthorizedNetworksConfig::SharedDtor() { } void MasterAuthorizedNetworksConfig::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* MasterAuthorizedNetworksConfig::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const MasterAuthorizedNetworksConfig& MasterAuthorizedNetworksConfig::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_MasterAuthorizedNetworksConfig.base); return *internal_default_instance(); } void MasterAuthorizedNetworksConfig::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.MasterAuthorizedNetworksConfig) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; cidr_blocks_.Clear(); enabled_ = false; _internal_metadata_.Clear(); } bool MasterAuthorizedNetworksConfig::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.MasterAuthorizedNetworksConfig) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // bool enabled = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( input, &enabled_))); } else { goto handle_unusual; } break; } // repeated .google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock cidr_blocks = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, add_cidr_blocks())); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.MasterAuthorizedNetworksConfig) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.MasterAuthorizedNetworksConfig) return false; #undef DO_ } void MasterAuthorizedNetworksConfig::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.MasterAuthorizedNetworksConfig) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // bool enabled = 1; if (this->enabled() != 0) { ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->enabled(), output); } // repeated .google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock cidr_blocks = 2; for (unsigned int i = 0, n = static_cast<unsigned int>(this->cidr_blocks_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 2, this->cidr_blocks(static_cast<int>(i)), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.MasterAuthorizedNetworksConfig) } ::google::protobuf::uint8* MasterAuthorizedNetworksConfig::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.MasterAuthorizedNetworksConfig) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // bool enabled = 1; if (this->enabled() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->enabled(), target); } // repeated .google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock cidr_blocks = 2; for (unsigned int i = 0, n = static_cast<unsigned int>(this->cidr_blocks_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 2, this->cidr_blocks(static_cast<int>(i)), deterministic, target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.MasterAuthorizedNetworksConfig) return target; } size_t MasterAuthorizedNetworksConfig::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.MasterAuthorizedNetworksConfig) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // repeated .google.container.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock cidr_blocks = 2; { unsigned int count = static_cast<unsigned int>(this->cidr_blocks_size()); total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSize( this->cidr_blocks(static_cast<int>(i))); } } // bool enabled = 1; if (this->enabled() != 0) { total_size += 1 + 1; } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void MasterAuthorizedNetworksConfig::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.MasterAuthorizedNetworksConfig) GOOGLE_DCHECK_NE(&from, this); const MasterAuthorizedNetworksConfig* source = ::google::protobuf::internal::DynamicCastToGenerated<const MasterAuthorizedNetworksConfig>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.MasterAuthorizedNetworksConfig) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.MasterAuthorizedNetworksConfig) MergeFrom(*source); } } void MasterAuthorizedNetworksConfig::MergeFrom(const MasterAuthorizedNetworksConfig& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.MasterAuthorizedNetworksConfig) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; cidr_blocks_.MergeFrom(from.cidr_blocks_); if (from.enabled() != 0) { set_enabled(from.enabled()); } } void MasterAuthorizedNetworksConfig::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.MasterAuthorizedNetworksConfig) if (&from == this) return; Clear(); MergeFrom(from); } void MasterAuthorizedNetworksConfig::CopyFrom(const MasterAuthorizedNetworksConfig& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.MasterAuthorizedNetworksConfig) if (&from == this) return; Clear(); MergeFrom(from); } bool MasterAuthorizedNetworksConfig::IsInitialized() const { return true; } void MasterAuthorizedNetworksConfig::Swap(MasterAuthorizedNetworksConfig* other) { if (other == this) return; InternalSwap(other); } void MasterAuthorizedNetworksConfig::InternalSwap(MasterAuthorizedNetworksConfig* other) { using std::swap; CastToBase(&cidr_blocks_)->InternalSwap(CastToBase(&other->cidr_blocks_)); swap(enabled_, other->enabled_); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata MasterAuthorizedNetworksConfig::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void NetworkPolicy::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int NetworkPolicy::kProviderFieldNumber; const int NetworkPolicy::kEnabledFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 NetworkPolicy::NetworkPolicy() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_NetworkPolicy.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.NetworkPolicy) } NetworkPolicy::NetworkPolicy(const NetworkPolicy& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); ::memcpy(&provider_, &from.provider_, static_cast<size_t>(reinterpret_cast<char*>(&enabled_) - reinterpret_cast<char*>(&provider_)) + sizeof(enabled_)); // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.NetworkPolicy) } void NetworkPolicy::SharedCtor() { ::memset(&provider_, 0, static_cast<size_t>( reinterpret_cast<char*>(&enabled_) - reinterpret_cast<char*>(&provider_)) + sizeof(enabled_)); } NetworkPolicy::~NetworkPolicy() { // @@protoc_insertion_point(destructor:google.container.v1beta1.NetworkPolicy) SharedDtor(); } void NetworkPolicy::SharedDtor() { } void NetworkPolicy::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* NetworkPolicy::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const NetworkPolicy& NetworkPolicy::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_NetworkPolicy.base); return *internal_default_instance(); } void NetworkPolicy::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.NetworkPolicy) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; ::memset(&provider_, 0, static_cast<size_t>( reinterpret_cast<char*>(&enabled_) - reinterpret_cast<char*>(&provider_)) + sizeof(enabled_)); _internal_metadata_.Clear(); } bool NetworkPolicy::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.NetworkPolicy) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // .google.container.v1beta1.NetworkPolicy.Provider provider = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( input, &value))); set_provider(static_cast< ::google::container::v1beta1::NetworkPolicy_Provider >(value)); } else { goto handle_unusual; } break; } // bool enabled = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( input, &enabled_))); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.NetworkPolicy) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.NetworkPolicy) return false; #undef DO_ } void NetworkPolicy::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.NetworkPolicy) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // .google.container.v1beta1.NetworkPolicy.Provider provider = 1; if (this->provider() != 0) { ::google::protobuf::internal::WireFormatLite::WriteEnum( 1, this->provider(), output); } // bool enabled = 2; if (this->enabled() != 0) { ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->enabled(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.NetworkPolicy) } ::google::protobuf::uint8* NetworkPolicy::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.NetworkPolicy) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // .google.container.v1beta1.NetworkPolicy.Provider provider = 1; if (this->provider() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( 1, this->provider(), target); } // bool enabled = 2; if (this->enabled() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->enabled(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.NetworkPolicy) return target; } size_t NetworkPolicy::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.NetworkPolicy) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // .google.container.v1beta1.NetworkPolicy.Provider provider = 1; if (this->provider() != 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::EnumSize(this->provider()); } // bool enabled = 2; if (this->enabled() != 0) { total_size += 1 + 1; } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void NetworkPolicy::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.NetworkPolicy) GOOGLE_DCHECK_NE(&from, this); const NetworkPolicy* source = ::google::protobuf::internal::DynamicCastToGenerated<const NetworkPolicy>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.NetworkPolicy) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.NetworkPolicy) MergeFrom(*source); } } void NetworkPolicy::MergeFrom(const NetworkPolicy& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.NetworkPolicy) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.provider() != 0) { set_provider(from.provider()); } if (from.enabled() != 0) { set_enabled(from.enabled()); } } void NetworkPolicy::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.NetworkPolicy) if (&from == this) return; Clear(); MergeFrom(from); } void NetworkPolicy::CopyFrom(const NetworkPolicy& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.NetworkPolicy) if (&from == this) return; Clear(); MergeFrom(from); } bool NetworkPolicy::IsInitialized() const { return true; } void NetworkPolicy::Swap(NetworkPolicy* other) { if (other == this) return; InternalSwap(other); } void NetworkPolicy::InternalSwap(NetworkPolicy* other) { using std::swap; swap(provider_, other->provider_); swap(enabled_, other->enabled_); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata NetworkPolicy::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void IPAllocationPolicy::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int IPAllocationPolicy::kUseIpAliasesFieldNumber; const int IPAllocationPolicy::kCreateSubnetworkFieldNumber; const int IPAllocationPolicy::kSubnetworkNameFieldNumber; const int IPAllocationPolicy::kClusterIpv4CidrFieldNumber; const int IPAllocationPolicy::kNodeIpv4CidrFieldNumber; const int IPAllocationPolicy::kServicesIpv4CidrFieldNumber; const int IPAllocationPolicy::kClusterSecondaryRangeNameFieldNumber; const int IPAllocationPolicy::kServicesSecondaryRangeNameFieldNumber; const int IPAllocationPolicy::kClusterIpv4CidrBlockFieldNumber; const int IPAllocationPolicy::kNodeIpv4CidrBlockFieldNumber; const int IPAllocationPolicy::kServicesIpv4CidrBlockFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 IPAllocationPolicy::IPAllocationPolicy() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_IPAllocationPolicy.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.IPAllocationPolicy) } IPAllocationPolicy::IPAllocationPolicy(const IPAllocationPolicy& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); subnetwork_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.subnetwork_name().size() > 0) { subnetwork_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.subnetwork_name_); } cluster_ipv4_cidr_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.cluster_ipv4_cidr().size() > 0) { cluster_ipv4_cidr_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cluster_ipv4_cidr_); } node_ipv4_cidr_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.node_ipv4_cidr().size() > 0) { node_ipv4_cidr_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.node_ipv4_cidr_); } services_ipv4_cidr_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.services_ipv4_cidr().size() > 0) { services_ipv4_cidr_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.services_ipv4_cidr_); } cluster_secondary_range_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.cluster_secondary_range_name().size() > 0) { cluster_secondary_range_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cluster_secondary_range_name_); } services_secondary_range_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.services_secondary_range_name().size() > 0) { services_secondary_range_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.services_secondary_range_name_); } cluster_ipv4_cidr_block_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.cluster_ipv4_cidr_block().size() > 0) { cluster_ipv4_cidr_block_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cluster_ipv4_cidr_block_); } node_ipv4_cidr_block_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.node_ipv4_cidr_block().size() > 0) { node_ipv4_cidr_block_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.node_ipv4_cidr_block_); } services_ipv4_cidr_block_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.services_ipv4_cidr_block().size() > 0) { services_ipv4_cidr_block_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.services_ipv4_cidr_block_); } ::memcpy(&use_ip_aliases_, &from.use_ip_aliases_, static_cast<size_t>(reinterpret_cast<char*>(&create_subnetwork_) - reinterpret_cast<char*>(&use_ip_aliases_)) + sizeof(create_subnetwork_)); // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.IPAllocationPolicy) } void IPAllocationPolicy::SharedCtor() { subnetwork_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_ipv4_cidr_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); node_ipv4_cidr_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); services_ipv4_cidr_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_secondary_range_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); services_secondary_range_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_ipv4_cidr_block_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); node_ipv4_cidr_block_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); services_ipv4_cidr_block_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); ::memset(&use_ip_aliases_, 0, static_cast<size_t>( reinterpret_cast<char*>(&create_subnetwork_) - reinterpret_cast<char*>(&use_ip_aliases_)) + sizeof(create_subnetwork_)); } IPAllocationPolicy::~IPAllocationPolicy() { // @@protoc_insertion_point(destructor:google.container.v1beta1.IPAllocationPolicy) SharedDtor(); } void IPAllocationPolicy::SharedDtor() { subnetwork_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_ipv4_cidr_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); node_ipv4_cidr_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); services_ipv4_cidr_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_secondary_range_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); services_secondary_range_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_ipv4_cidr_block_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); node_ipv4_cidr_block_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); services_ipv4_cidr_block_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } void IPAllocationPolicy::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* IPAllocationPolicy::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const IPAllocationPolicy& IPAllocationPolicy::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_IPAllocationPolicy.base); return *internal_default_instance(); } void IPAllocationPolicy::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.IPAllocationPolicy) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; subnetwork_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_ipv4_cidr_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); node_ipv4_cidr_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); services_ipv4_cidr_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_secondary_range_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); services_secondary_range_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_ipv4_cidr_block_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); node_ipv4_cidr_block_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); services_ipv4_cidr_block_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); ::memset(&use_ip_aliases_, 0, static_cast<size_t>( reinterpret_cast<char*>(&create_subnetwork_) - reinterpret_cast<char*>(&use_ip_aliases_)) + sizeof(create_subnetwork_)); _internal_metadata_.Clear(); } bool IPAllocationPolicy::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.IPAllocationPolicy) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // bool use_ip_aliases = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( input, &use_ip_aliases_))); } else { goto handle_unusual; } break; } // bool create_subnetwork = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( input, &create_subnetwork_))); } else { goto handle_unusual; } break; } // string subnetwork_name = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_subnetwork_name())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->subnetwork_name().data(), static_cast<int>(this->subnetwork_name().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.IPAllocationPolicy.subnetwork_name")); } else { goto handle_unusual; } break; } // string cluster_ipv4_cidr = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_cluster_ipv4_cidr())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_ipv4_cidr().data(), static_cast<int>(this->cluster_ipv4_cidr().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.IPAllocationPolicy.cluster_ipv4_cidr")); } else { goto handle_unusual; } break; } // string node_ipv4_cidr = 5; case 5: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_node_ipv4_cidr())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->node_ipv4_cidr().data(), static_cast<int>(this->node_ipv4_cidr().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.IPAllocationPolicy.node_ipv4_cidr")); } else { goto handle_unusual; } break; } // string services_ipv4_cidr = 6; case 6: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_services_ipv4_cidr())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->services_ipv4_cidr().data(), static_cast<int>(this->services_ipv4_cidr().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.IPAllocationPolicy.services_ipv4_cidr")); } else { goto handle_unusual; } break; } // string cluster_secondary_range_name = 7; case 7: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_cluster_secondary_range_name())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_secondary_range_name().data(), static_cast<int>(this->cluster_secondary_range_name().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.IPAllocationPolicy.cluster_secondary_range_name")); } else { goto handle_unusual; } break; } // string services_secondary_range_name = 8; case 8: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_services_secondary_range_name())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->services_secondary_range_name().data(), static_cast<int>(this->services_secondary_range_name().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.IPAllocationPolicy.services_secondary_range_name")); } else { goto handle_unusual; } break; } // string cluster_ipv4_cidr_block = 9; case 9: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(74u /* 74 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_cluster_ipv4_cidr_block())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_ipv4_cidr_block().data(), static_cast<int>(this->cluster_ipv4_cidr_block().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.IPAllocationPolicy.cluster_ipv4_cidr_block")); } else { goto handle_unusual; } break; } // string node_ipv4_cidr_block = 10; case 10: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(82u /* 82 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_node_ipv4_cidr_block())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->node_ipv4_cidr_block().data(), static_cast<int>(this->node_ipv4_cidr_block().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.IPAllocationPolicy.node_ipv4_cidr_block")); } else { goto handle_unusual; } break; } // string services_ipv4_cidr_block = 11; case 11: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(90u /* 90 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_services_ipv4_cidr_block())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->services_ipv4_cidr_block().data(), static_cast<int>(this->services_ipv4_cidr_block().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.IPAllocationPolicy.services_ipv4_cidr_block")); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.IPAllocationPolicy) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.IPAllocationPolicy) return false; #undef DO_ } void IPAllocationPolicy::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.IPAllocationPolicy) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // bool use_ip_aliases = 1; if (this->use_ip_aliases() != 0) { ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->use_ip_aliases(), output); } // bool create_subnetwork = 2; if (this->create_subnetwork() != 0) { ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->create_subnetwork(), output); } // string subnetwork_name = 3; if (this->subnetwork_name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->subnetwork_name().data(), static_cast<int>(this->subnetwork_name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.IPAllocationPolicy.subnetwork_name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 3, this->subnetwork_name(), output); } // string cluster_ipv4_cidr = 4; if (this->cluster_ipv4_cidr().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_ipv4_cidr().data(), static_cast<int>(this->cluster_ipv4_cidr().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.IPAllocationPolicy.cluster_ipv4_cidr"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 4, this->cluster_ipv4_cidr(), output); } // string node_ipv4_cidr = 5; if (this->node_ipv4_cidr().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->node_ipv4_cidr().data(), static_cast<int>(this->node_ipv4_cidr().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.IPAllocationPolicy.node_ipv4_cidr"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 5, this->node_ipv4_cidr(), output); } // string services_ipv4_cidr = 6; if (this->services_ipv4_cidr().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->services_ipv4_cidr().data(), static_cast<int>(this->services_ipv4_cidr().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.IPAllocationPolicy.services_ipv4_cidr"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 6, this->services_ipv4_cidr(), output); } // string cluster_secondary_range_name = 7; if (this->cluster_secondary_range_name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_secondary_range_name().data(), static_cast<int>(this->cluster_secondary_range_name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.IPAllocationPolicy.cluster_secondary_range_name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 7, this->cluster_secondary_range_name(), output); } // string services_secondary_range_name = 8; if (this->services_secondary_range_name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->services_secondary_range_name().data(), static_cast<int>(this->services_secondary_range_name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.IPAllocationPolicy.services_secondary_range_name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 8, this->services_secondary_range_name(), output); } // string cluster_ipv4_cidr_block = 9; if (this->cluster_ipv4_cidr_block().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_ipv4_cidr_block().data(), static_cast<int>(this->cluster_ipv4_cidr_block().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.IPAllocationPolicy.cluster_ipv4_cidr_block"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 9, this->cluster_ipv4_cidr_block(), output); } // string node_ipv4_cidr_block = 10; if (this->node_ipv4_cidr_block().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->node_ipv4_cidr_block().data(), static_cast<int>(this->node_ipv4_cidr_block().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.IPAllocationPolicy.node_ipv4_cidr_block"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 10, this->node_ipv4_cidr_block(), output); } // string services_ipv4_cidr_block = 11; if (this->services_ipv4_cidr_block().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->services_ipv4_cidr_block().data(), static_cast<int>(this->services_ipv4_cidr_block().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.IPAllocationPolicy.services_ipv4_cidr_block"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 11, this->services_ipv4_cidr_block(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.IPAllocationPolicy) } ::google::protobuf::uint8* IPAllocationPolicy::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.IPAllocationPolicy) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // bool use_ip_aliases = 1; if (this->use_ip_aliases() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->use_ip_aliases(), target); } // bool create_subnetwork = 2; if (this->create_subnetwork() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->create_subnetwork(), target); } // string subnetwork_name = 3; if (this->subnetwork_name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->subnetwork_name().data(), static_cast<int>(this->subnetwork_name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.IPAllocationPolicy.subnetwork_name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 3, this->subnetwork_name(), target); } // string cluster_ipv4_cidr = 4; if (this->cluster_ipv4_cidr().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_ipv4_cidr().data(), static_cast<int>(this->cluster_ipv4_cidr().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.IPAllocationPolicy.cluster_ipv4_cidr"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 4, this->cluster_ipv4_cidr(), target); } // string node_ipv4_cidr = 5; if (this->node_ipv4_cidr().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->node_ipv4_cidr().data(), static_cast<int>(this->node_ipv4_cidr().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.IPAllocationPolicy.node_ipv4_cidr"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 5, this->node_ipv4_cidr(), target); } // string services_ipv4_cidr = 6; if (this->services_ipv4_cidr().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->services_ipv4_cidr().data(), static_cast<int>(this->services_ipv4_cidr().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.IPAllocationPolicy.services_ipv4_cidr"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 6, this->services_ipv4_cidr(), target); } // string cluster_secondary_range_name = 7; if (this->cluster_secondary_range_name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_secondary_range_name().data(), static_cast<int>(this->cluster_secondary_range_name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.IPAllocationPolicy.cluster_secondary_range_name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 7, this->cluster_secondary_range_name(), target); } // string services_secondary_range_name = 8; if (this->services_secondary_range_name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->services_secondary_range_name().data(), static_cast<int>(this->services_secondary_range_name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.IPAllocationPolicy.services_secondary_range_name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 8, this->services_secondary_range_name(), target); } // string cluster_ipv4_cidr_block = 9; if (this->cluster_ipv4_cidr_block().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_ipv4_cidr_block().data(), static_cast<int>(this->cluster_ipv4_cidr_block().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.IPAllocationPolicy.cluster_ipv4_cidr_block"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 9, this->cluster_ipv4_cidr_block(), target); } // string node_ipv4_cidr_block = 10; if (this->node_ipv4_cidr_block().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->node_ipv4_cidr_block().data(), static_cast<int>(this->node_ipv4_cidr_block().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.IPAllocationPolicy.node_ipv4_cidr_block"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 10, this->node_ipv4_cidr_block(), target); } // string services_ipv4_cidr_block = 11; if (this->services_ipv4_cidr_block().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->services_ipv4_cidr_block().data(), static_cast<int>(this->services_ipv4_cidr_block().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.IPAllocationPolicy.services_ipv4_cidr_block"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 11, this->services_ipv4_cidr_block(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.IPAllocationPolicy) return target; } size_t IPAllocationPolicy::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.IPAllocationPolicy) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // string subnetwork_name = 3; if (this->subnetwork_name().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->subnetwork_name()); } // string cluster_ipv4_cidr = 4; if (this->cluster_ipv4_cidr().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->cluster_ipv4_cidr()); } // string node_ipv4_cidr = 5; if (this->node_ipv4_cidr().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->node_ipv4_cidr()); } // string services_ipv4_cidr = 6; if (this->services_ipv4_cidr().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->services_ipv4_cidr()); } // string cluster_secondary_range_name = 7; if (this->cluster_secondary_range_name().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->cluster_secondary_range_name()); } // string services_secondary_range_name = 8; if (this->services_secondary_range_name().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->services_secondary_range_name()); } // string cluster_ipv4_cidr_block = 9; if (this->cluster_ipv4_cidr_block().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->cluster_ipv4_cidr_block()); } // string node_ipv4_cidr_block = 10; if (this->node_ipv4_cidr_block().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->node_ipv4_cidr_block()); } // string services_ipv4_cidr_block = 11; if (this->services_ipv4_cidr_block().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->services_ipv4_cidr_block()); } // bool use_ip_aliases = 1; if (this->use_ip_aliases() != 0) { total_size += 1 + 1; } // bool create_subnetwork = 2; if (this->create_subnetwork() != 0) { total_size += 1 + 1; } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void IPAllocationPolicy::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.IPAllocationPolicy) GOOGLE_DCHECK_NE(&from, this); const IPAllocationPolicy* source = ::google::protobuf::internal::DynamicCastToGenerated<const IPAllocationPolicy>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.IPAllocationPolicy) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.IPAllocationPolicy) MergeFrom(*source); } } void IPAllocationPolicy::MergeFrom(const IPAllocationPolicy& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.IPAllocationPolicy) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.subnetwork_name().size() > 0) { subnetwork_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.subnetwork_name_); } if (from.cluster_ipv4_cidr().size() > 0) { cluster_ipv4_cidr_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cluster_ipv4_cidr_); } if (from.node_ipv4_cidr().size() > 0) { node_ipv4_cidr_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.node_ipv4_cidr_); } if (from.services_ipv4_cidr().size() > 0) { services_ipv4_cidr_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.services_ipv4_cidr_); } if (from.cluster_secondary_range_name().size() > 0) { cluster_secondary_range_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cluster_secondary_range_name_); } if (from.services_secondary_range_name().size() > 0) { services_secondary_range_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.services_secondary_range_name_); } if (from.cluster_ipv4_cidr_block().size() > 0) { cluster_ipv4_cidr_block_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cluster_ipv4_cidr_block_); } if (from.node_ipv4_cidr_block().size() > 0) { node_ipv4_cidr_block_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.node_ipv4_cidr_block_); } if (from.services_ipv4_cidr_block().size() > 0) { services_ipv4_cidr_block_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.services_ipv4_cidr_block_); } if (from.use_ip_aliases() != 0) { set_use_ip_aliases(from.use_ip_aliases()); } if (from.create_subnetwork() != 0) { set_create_subnetwork(from.create_subnetwork()); } } void IPAllocationPolicy::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.IPAllocationPolicy) if (&from == this) return; Clear(); MergeFrom(from); } void IPAllocationPolicy::CopyFrom(const IPAllocationPolicy& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.IPAllocationPolicy) if (&from == this) return; Clear(); MergeFrom(from); } bool IPAllocationPolicy::IsInitialized() const { return true; } void IPAllocationPolicy::Swap(IPAllocationPolicy* other) { if (other == this) return; InternalSwap(other); } void IPAllocationPolicy::InternalSwap(IPAllocationPolicy* other) { using std::swap; subnetwork_name_.Swap(&other->subnetwork_name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); cluster_ipv4_cidr_.Swap(&other->cluster_ipv4_cidr_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); node_ipv4_cidr_.Swap(&other->node_ipv4_cidr_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); services_ipv4_cidr_.Swap(&other->services_ipv4_cidr_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); cluster_secondary_range_name_.Swap(&other->cluster_secondary_range_name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); services_secondary_range_name_.Swap(&other->services_secondary_range_name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); cluster_ipv4_cidr_block_.Swap(&other->cluster_ipv4_cidr_block_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); node_ipv4_cidr_block_.Swap(&other->node_ipv4_cidr_block_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); services_ipv4_cidr_block_.Swap(&other->services_ipv4_cidr_block_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(use_ip_aliases_, other->use_ip_aliases_); swap(create_subnetwork_, other->create_subnetwork_); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata IPAllocationPolicy::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void PodSecurityPolicyConfig::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int PodSecurityPolicyConfig::kEnabledFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 PodSecurityPolicyConfig::PodSecurityPolicyConfig() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_PodSecurityPolicyConfig.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.PodSecurityPolicyConfig) } PodSecurityPolicyConfig::PodSecurityPolicyConfig(const PodSecurityPolicyConfig& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); enabled_ = from.enabled_; // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.PodSecurityPolicyConfig) } void PodSecurityPolicyConfig::SharedCtor() { enabled_ = false; } PodSecurityPolicyConfig::~PodSecurityPolicyConfig() { // @@protoc_insertion_point(destructor:google.container.v1beta1.PodSecurityPolicyConfig) SharedDtor(); } void PodSecurityPolicyConfig::SharedDtor() { } void PodSecurityPolicyConfig::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* PodSecurityPolicyConfig::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const PodSecurityPolicyConfig& PodSecurityPolicyConfig::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_PodSecurityPolicyConfig.base); return *internal_default_instance(); } void PodSecurityPolicyConfig::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.PodSecurityPolicyConfig) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; enabled_ = false; _internal_metadata_.Clear(); } bool PodSecurityPolicyConfig::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.PodSecurityPolicyConfig) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // bool enabled = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( input, &enabled_))); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.PodSecurityPolicyConfig) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.PodSecurityPolicyConfig) return false; #undef DO_ } void PodSecurityPolicyConfig::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.PodSecurityPolicyConfig) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // bool enabled = 1; if (this->enabled() != 0) { ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->enabled(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.PodSecurityPolicyConfig) } ::google::protobuf::uint8* PodSecurityPolicyConfig::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.PodSecurityPolicyConfig) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // bool enabled = 1; if (this->enabled() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->enabled(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.PodSecurityPolicyConfig) return target; } size_t PodSecurityPolicyConfig::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.PodSecurityPolicyConfig) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // bool enabled = 1; if (this->enabled() != 0) { total_size += 1 + 1; } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void PodSecurityPolicyConfig::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.PodSecurityPolicyConfig) GOOGLE_DCHECK_NE(&from, this); const PodSecurityPolicyConfig* source = ::google::protobuf::internal::DynamicCastToGenerated<const PodSecurityPolicyConfig>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.PodSecurityPolicyConfig) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.PodSecurityPolicyConfig) MergeFrom(*source); } } void PodSecurityPolicyConfig::MergeFrom(const PodSecurityPolicyConfig& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.PodSecurityPolicyConfig) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.enabled() != 0) { set_enabled(from.enabled()); } } void PodSecurityPolicyConfig::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.PodSecurityPolicyConfig) if (&from == this) return; Clear(); MergeFrom(from); } void PodSecurityPolicyConfig::CopyFrom(const PodSecurityPolicyConfig& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.PodSecurityPolicyConfig) if (&from == this) return; Clear(); MergeFrom(from); } bool PodSecurityPolicyConfig::IsInitialized() const { return true; } void PodSecurityPolicyConfig::Swap(PodSecurityPolicyConfig* other) { if (other == this) return; InternalSwap(other); } void PodSecurityPolicyConfig::InternalSwap(PodSecurityPolicyConfig* other) { using std::swap; swap(enabled_, other->enabled_); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata PodSecurityPolicyConfig::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void Cluster::InitAsDefaultInstance() { ::google::container::v1beta1::_Cluster_default_instance_._instance.get_mutable()->node_config_ = const_cast< ::google::container::v1beta1::NodeConfig*>( ::google::container::v1beta1::NodeConfig::internal_default_instance()); ::google::container::v1beta1::_Cluster_default_instance_._instance.get_mutable()->master_auth_ = const_cast< ::google::container::v1beta1::MasterAuth*>( ::google::container::v1beta1::MasterAuth::internal_default_instance()); ::google::container::v1beta1::_Cluster_default_instance_._instance.get_mutable()->addons_config_ = const_cast< ::google::container::v1beta1::AddonsConfig*>( ::google::container::v1beta1::AddonsConfig::internal_default_instance()); ::google::container::v1beta1::_Cluster_default_instance_._instance.get_mutable()->network_policy_ = const_cast< ::google::container::v1beta1::NetworkPolicy*>( ::google::container::v1beta1::NetworkPolicy::internal_default_instance()); ::google::container::v1beta1::_Cluster_default_instance_._instance.get_mutable()->ip_allocation_policy_ = const_cast< ::google::container::v1beta1::IPAllocationPolicy*>( ::google::container::v1beta1::IPAllocationPolicy::internal_default_instance()); ::google::container::v1beta1::_Cluster_default_instance_._instance.get_mutable()->master_authorized_networks_config_ = const_cast< ::google::container::v1beta1::MasterAuthorizedNetworksConfig*>( ::google::container::v1beta1::MasterAuthorizedNetworksConfig::internal_default_instance()); ::google::container::v1beta1::_Cluster_default_instance_._instance.get_mutable()->maintenance_policy_ = const_cast< ::google::container::v1beta1::MaintenancePolicy*>( ::google::container::v1beta1::MaintenancePolicy::internal_default_instance()); ::google::container::v1beta1::_Cluster_default_instance_._instance.get_mutable()->pod_security_policy_config_ = const_cast< ::google::container::v1beta1::PodSecurityPolicyConfig*>( ::google::container::v1beta1::PodSecurityPolicyConfig::internal_default_instance()); } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int Cluster::kNameFieldNumber; const int Cluster::kDescriptionFieldNumber; const int Cluster::kInitialNodeCountFieldNumber; const int Cluster::kNodeConfigFieldNumber; const int Cluster::kMasterAuthFieldNumber; const int Cluster::kLoggingServiceFieldNumber; const int Cluster::kMonitoringServiceFieldNumber; const int Cluster::kNetworkFieldNumber; const int Cluster::kClusterIpv4CidrFieldNumber; const int Cluster::kAddonsConfigFieldNumber; const int Cluster::kSubnetworkFieldNumber; const int Cluster::kNodePoolsFieldNumber; const int Cluster::kLocationsFieldNumber; const int Cluster::kEnableKubernetesAlphaFieldNumber; const int Cluster::kNetworkPolicyFieldNumber; const int Cluster::kIpAllocationPolicyFieldNumber; const int Cluster::kMasterAuthorizedNetworksConfigFieldNumber; const int Cluster::kMaintenancePolicyFieldNumber; const int Cluster::kPodSecurityPolicyConfigFieldNumber; const int Cluster::kSelfLinkFieldNumber; const int Cluster::kZoneFieldNumber; const int Cluster::kEndpointFieldNumber; const int Cluster::kInitialClusterVersionFieldNumber; const int Cluster::kCurrentMasterVersionFieldNumber; const int Cluster::kCurrentNodeVersionFieldNumber; const int Cluster::kCreateTimeFieldNumber; const int Cluster::kStatusFieldNumber; const int Cluster::kStatusMessageFieldNumber; const int Cluster::kNodeIpv4CidrSizeFieldNumber; const int Cluster::kServicesIpv4CidrFieldNumber; const int Cluster::kInstanceGroupUrlsFieldNumber; const int Cluster::kCurrentNodeCountFieldNumber; const int Cluster::kExpireTimeFieldNumber; const int Cluster::kLocationFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 Cluster::Cluster() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_Cluster.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.Cluster) } Cluster::Cluster(const Cluster& from) : ::google::protobuf::Message(), _internal_metadata_(NULL), node_pools_(from.node_pools_), locations_(from.locations_), instance_group_urls_(from.instance_group_urls_) { _internal_metadata_.MergeFrom(from._internal_metadata_); name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.name().size() > 0) { name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } description_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.description().size() > 0) { description_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.description_); } logging_service_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.logging_service().size() > 0) { logging_service_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.logging_service_); } monitoring_service_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.monitoring_service().size() > 0) { monitoring_service_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.monitoring_service_); } network_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.network().size() > 0) { network_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.network_); } cluster_ipv4_cidr_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.cluster_ipv4_cidr().size() > 0) { cluster_ipv4_cidr_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cluster_ipv4_cidr_); } subnetwork_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.subnetwork().size() > 0) { subnetwork_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.subnetwork_); } self_link_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.self_link().size() > 0) { self_link_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.self_link_); } zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } endpoint_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.endpoint().size() > 0) { endpoint_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.endpoint_); } initial_cluster_version_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.initial_cluster_version().size() > 0) { initial_cluster_version_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.initial_cluster_version_); } current_master_version_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.current_master_version().size() > 0) { current_master_version_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.current_master_version_); } current_node_version_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.current_node_version().size() > 0) { current_node_version_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.current_node_version_); } create_time_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.create_time().size() > 0) { create_time_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.create_time_); } status_message_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.status_message().size() > 0) { status_message_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.status_message_); } services_ipv4_cidr_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.services_ipv4_cidr().size() > 0) { services_ipv4_cidr_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.services_ipv4_cidr_); } expire_time_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.expire_time().size() > 0) { expire_time_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.expire_time_); } location_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.location().size() > 0) { location_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.location_); } if (from.has_node_config()) { node_config_ = new ::google::container::v1beta1::NodeConfig(*from.node_config_); } else { node_config_ = NULL; } if (from.has_master_auth()) { master_auth_ = new ::google::container::v1beta1::MasterAuth(*from.master_auth_); } else { master_auth_ = NULL; } if (from.has_addons_config()) { addons_config_ = new ::google::container::v1beta1::AddonsConfig(*from.addons_config_); } else { addons_config_ = NULL; } if (from.has_network_policy()) { network_policy_ = new ::google::container::v1beta1::NetworkPolicy(*from.network_policy_); } else { network_policy_ = NULL; } if (from.has_ip_allocation_policy()) { ip_allocation_policy_ = new ::google::container::v1beta1::IPAllocationPolicy(*from.ip_allocation_policy_); } else { ip_allocation_policy_ = NULL; } if (from.has_master_authorized_networks_config()) { master_authorized_networks_config_ = new ::google::container::v1beta1::MasterAuthorizedNetworksConfig(*from.master_authorized_networks_config_); } else { master_authorized_networks_config_ = NULL; } if (from.has_maintenance_policy()) { maintenance_policy_ = new ::google::container::v1beta1::MaintenancePolicy(*from.maintenance_policy_); } else { maintenance_policy_ = NULL; } if (from.has_pod_security_policy_config()) { pod_security_policy_config_ = new ::google::container::v1beta1::PodSecurityPolicyConfig(*from.pod_security_policy_config_); } else { pod_security_policy_config_ = NULL; } ::memcpy(&initial_node_count_, &from.initial_node_count_, static_cast<size_t>(reinterpret_cast<char*>(&node_ipv4_cidr_size_) - reinterpret_cast<char*>(&initial_node_count_)) + sizeof(node_ipv4_cidr_size_)); // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.Cluster) } void Cluster::SharedCtor() { name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); description_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); logging_service_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); monitoring_service_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); network_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_ipv4_cidr_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); subnetwork_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); self_link_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); endpoint_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); initial_cluster_version_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); current_master_version_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); current_node_version_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); create_time_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); status_message_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); services_ipv4_cidr_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); expire_time_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); location_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); ::memset(&node_config_, 0, static_cast<size_t>( reinterpret_cast<char*>(&node_ipv4_cidr_size_) - reinterpret_cast<char*>(&node_config_)) + sizeof(node_ipv4_cidr_size_)); } Cluster::~Cluster() { // @@protoc_insertion_point(destructor:google.container.v1beta1.Cluster) SharedDtor(); } void Cluster::SharedDtor() { name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); description_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); logging_service_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); monitoring_service_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); network_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_ipv4_cidr_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); subnetwork_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); self_link_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); endpoint_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); initial_cluster_version_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); current_master_version_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); current_node_version_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); create_time_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); status_message_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); services_ipv4_cidr_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); expire_time_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); location_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete node_config_; if (this != internal_default_instance()) delete master_auth_; if (this != internal_default_instance()) delete addons_config_; if (this != internal_default_instance()) delete network_policy_; if (this != internal_default_instance()) delete ip_allocation_policy_; if (this != internal_default_instance()) delete master_authorized_networks_config_; if (this != internal_default_instance()) delete maintenance_policy_; if (this != internal_default_instance()) delete pod_security_policy_config_; } void Cluster::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* Cluster::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const Cluster& Cluster::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_Cluster.base); return *internal_default_instance(); } void Cluster::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.Cluster) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; node_pools_.Clear(); locations_.Clear(); instance_group_urls_.Clear(); name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); description_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); logging_service_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); monitoring_service_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); network_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_ipv4_cidr_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); subnetwork_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); self_link_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); endpoint_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); initial_cluster_version_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); current_master_version_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); current_node_version_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); create_time_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); status_message_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); services_ipv4_cidr_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); expire_time_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); location_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (GetArenaNoVirtual() == NULL && node_config_ != NULL) { delete node_config_; } node_config_ = NULL; if (GetArenaNoVirtual() == NULL && master_auth_ != NULL) { delete master_auth_; } master_auth_ = NULL; if (GetArenaNoVirtual() == NULL && addons_config_ != NULL) { delete addons_config_; } addons_config_ = NULL; if (GetArenaNoVirtual() == NULL && network_policy_ != NULL) { delete network_policy_; } network_policy_ = NULL; if (GetArenaNoVirtual() == NULL && ip_allocation_policy_ != NULL) { delete ip_allocation_policy_; } ip_allocation_policy_ = NULL; if (GetArenaNoVirtual() == NULL && master_authorized_networks_config_ != NULL) { delete master_authorized_networks_config_; } master_authorized_networks_config_ = NULL; if (GetArenaNoVirtual() == NULL && maintenance_policy_ != NULL) { delete maintenance_policy_; } maintenance_policy_ = NULL; if (GetArenaNoVirtual() == NULL && pod_security_policy_config_ != NULL) { delete pod_security_policy_config_; } pod_security_policy_config_ = NULL; ::memset(&initial_node_count_, 0, static_cast<size_t>( reinterpret_cast<char*>(&node_ipv4_cidr_size_) - reinterpret_cast<char*>(&initial_node_count_)) + sizeof(node_ipv4_cidr_size_)); _internal_metadata_.Clear(); } bool Cluster::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.Cluster) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string name = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_name())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.Cluster.name")); } else { goto handle_unusual; } break; } // string description = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_description())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->description().data(), static_cast<int>(this->description().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.Cluster.description")); } else { goto handle_unusual; } break; } // int32 initial_node_count = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &initial_node_count_))); } else { goto handle_unusual; } break; } // .google.container.v1beta1.NodeConfig node_config = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, mutable_node_config())); } else { goto handle_unusual; } break; } // .google.container.v1beta1.MasterAuth master_auth = 5; case 5: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, mutable_master_auth())); } else { goto handle_unusual; } break; } // string logging_service = 6; case 6: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_logging_service())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->logging_service().data(), static_cast<int>(this->logging_service().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.Cluster.logging_service")); } else { goto handle_unusual; } break; } // string monitoring_service = 7; case 7: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_monitoring_service())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->monitoring_service().data(), static_cast<int>(this->monitoring_service().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.Cluster.monitoring_service")); } else { goto handle_unusual; } break; } // string network = 8; case 8: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_network())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->network().data(), static_cast<int>(this->network().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.Cluster.network")); } else { goto handle_unusual; } break; } // string cluster_ipv4_cidr = 9; case 9: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(74u /* 74 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_cluster_ipv4_cidr())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_ipv4_cidr().data(), static_cast<int>(this->cluster_ipv4_cidr().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.Cluster.cluster_ipv4_cidr")); } else { goto handle_unusual; } break; } // .google.container.v1beta1.AddonsConfig addons_config = 10; case 10: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(82u /* 82 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, mutable_addons_config())); } else { goto handle_unusual; } break; } // string subnetwork = 11; case 11: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(90u /* 90 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_subnetwork())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->subnetwork().data(), static_cast<int>(this->subnetwork().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.Cluster.subnetwork")); } else { goto handle_unusual; } break; } // repeated .google.container.v1beta1.NodePool node_pools = 12; case 12: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(98u /* 98 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, add_node_pools())); } else { goto handle_unusual; } break; } // repeated string locations = 13; case 13: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(106u /* 106 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->add_locations())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->locations(this->locations_size() - 1).data(), static_cast<int>(this->locations(this->locations_size() - 1).length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.Cluster.locations")); } else { goto handle_unusual; } break; } // bool enable_kubernetes_alpha = 14; case 14: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(112u /* 112 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( input, &enable_kubernetes_alpha_))); } else { goto handle_unusual; } break; } // .google.container.v1beta1.NetworkPolicy network_policy = 19; case 19: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(154u /* 154 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, mutable_network_policy())); } else { goto handle_unusual; } break; } // .google.container.v1beta1.IPAllocationPolicy ip_allocation_policy = 20; case 20: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(162u /* 162 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, mutable_ip_allocation_policy())); } else { goto handle_unusual; } break; } // .google.container.v1beta1.MasterAuthorizedNetworksConfig master_authorized_networks_config = 22; case 22: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(178u /* 178 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, mutable_master_authorized_networks_config())); } else { goto handle_unusual; } break; } // .google.container.v1beta1.MaintenancePolicy maintenance_policy = 23; case 23: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(186u /* 186 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, mutable_maintenance_policy())); } else { goto handle_unusual; } break; } // .google.container.v1beta1.PodSecurityPolicyConfig pod_security_policy_config = 25; case 25: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(202u /* 202 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, mutable_pod_security_policy_config())); } else { goto handle_unusual; } break; } // string self_link = 100; case 100: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(34u /* 802 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_self_link())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->self_link().data(), static_cast<int>(this->self_link().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.Cluster.self_link")); } else { goto handle_unusual; } break; } // string zone = 101; case 101: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(42u /* 810 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_zone())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.Cluster.zone")); } else { goto handle_unusual; } break; } // string endpoint = 102; case 102: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(50u /* 818 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_endpoint())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->endpoint().data(), static_cast<int>(this->endpoint().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.Cluster.endpoint")); } else { goto handle_unusual; } break; } // string initial_cluster_version = 103; case 103: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(58u /* 826 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_initial_cluster_version())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->initial_cluster_version().data(), static_cast<int>(this->initial_cluster_version().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.Cluster.initial_cluster_version")); } else { goto handle_unusual; } break; } // string current_master_version = 104; case 104: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(66u /* 834 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_current_master_version())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->current_master_version().data(), static_cast<int>(this->current_master_version().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.Cluster.current_master_version")); } else { goto handle_unusual; } break; } // string current_node_version = 105; case 105: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(74u /* 842 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_current_node_version())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->current_node_version().data(), static_cast<int>(this->current_node_version().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.Cluster.current_node_version")); } else { goto handle_unusual; } break; } // string create_time = 106; case 106: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(82u /* 850 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_create_time())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->create_time().data(), static_cast<int>(this->create_time().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.Cluster.create_time")); } else { goto handle_unusual; } break; } // .google.container.v1beta1.Cluster.Status status = 107; case 107: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(88u /* 856 & 0xFF */)) { int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( input, &value))); set_status(static_cast< ::google::container::v1beta1::Cluster_Status >(value)); } else { goto handle_unusual; } break; } // string status_message = 108; case 108: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(98u /* 866 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_status_message())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->status_message().data(), static_cast<int>(this->status_message().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.Cluster.status_message")); } else { goto handle_unusual; } break; } // int32 node_ipv4_cidr_size = 109; case 109: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(104u /* 872 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &node_ipv4_cidr_size_))); } else { goto handle_unusual; } break; } // string services_ipv4_cidr = 110; case 110: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(114u /* 882 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_services_ipv4_cidr())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->services_ipv4_cidr().data(), static_cast<int>(this->services_ipv4_cidr().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.Cluster.services_ipv4_cidr")); } else { goto handle_unusual; } break; } // repeated string instance_group_urls = 111; case 111: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(122u /* 890 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->add_instance_group_urls())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->instance_group_urls(this->instance_group_urls_size() - 1).data(), static_cast<int>(this->instance_group_urls(this->instance_group_urls_size() - 1).length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.Cluster.instance_group_urls")); } else { goto handle_unusual; } break; } // int32 current_node_count = 112; case 112: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(128u /* 896 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &current_node_count_))); } else { goto handle_unusual; } break; } // string expire_time = 113; case 113: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(138u /* 906 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_expire_time())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->expire_time().data(), static_cast<int>(this->expire_time().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.Cluster.expire_time")); } else { goto handle_unusual; } break; } // string location = 114; case 114: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(146u /* 914 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_location())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->location().data(), static_cast<int>(this->location().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.Cluster.location")); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.Cluster) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.Cluster) return false; #undef DO_ } void Cluster::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.Cluster) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string name = 1; if (this->name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Cluster.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->name(), output); } // string description = 2; if (this->description().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->description().data(), static_cast<int>(this->description().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Cluster.description"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->description(), output); } // int32 initial_node_count = 3; if (this->initial_node_count() != 0) { ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->initial_node_count(), output); } // .google.container.v1beta1.NodeConfig node_config = 4; if (this->has_node_config()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 4, this->_internal_node_config(), output); } // .google.container.v1beta1.MasterAuth master_auth = 5; if (this->has_master_auth()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 5, this->_internal_master_auth(), output); } // string logging_service = 6; if (this->logging_service().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->logging_service().data(), static_cast<int>(this->logging_service().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Cluster.logging_service"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 6, this->logging_service(), output); } // string monitoring_service = 7; if (this->monitoring_service().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->monitoring_service().data(), static_cast<int>(this->monitoring_service().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Cluster.monitoring_service"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 7, this->monitoring_service(), output); } // string network = 8; if (this->network().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->network().data(), static_cast<int>(this->network().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Cluster.network"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 8, this->network(), output); } // string cluster_ipv4_cidr = 9; if (this->cluster_ipv4_cidr().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_ipv4_cidr().data(), static_cast<int>(this->cluster_ipv4_cidr().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Cluster.cluster_ipv4_cidr"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 9, this->cluster_ipv4_cidr(), output); } // .google.container.v1beta1.AddonsConfig addons_config = 10; if (this->has_addons_config()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 10, this->_internal_addons_config(), output); } // string subnetwork = 11; if (this->subnetwork().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->subnetwork().data(), static_cast<int>(this->subnetwork().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Cluster.subnetwork"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 11, this->subnetwork(), output); } // repeated .google.container.v1beta1.NodePool node_pools = 12; for (unsigned int i = 0, n = static_cast<unsigned int>(this->node_pools_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 12, this->node_pools(static_cast<int>(i)), output); } // repeated string locations = 13; for (int i = 0, n = this->locations_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->locations(i).data(), static_cast<int>(this->locations(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Cluster.locations"); ::google::protobuf::internal::WireFormatLite::WriteString( 13, this->locations(i), output); } // bool enable_kubernetes_alpha = 14; if (this->enable_kubernetes_alpha() != 0) { ::google::protobuf::internal::WireFormatLite::WriteBool(14, this->enable_kubernetes_alpha(), output); } // .google.container.v1beta1.NetworkPolicy network_policy = 19; if (this->has_network_policy()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 19, this->_internal_network_policy(), output); } // .google.container.v1beta1.IPAllocationPolicy ip_allocation_policy = 20; if (this->has_ip_allocation_policy()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 20, this->_internal_ip_allocation_policy(), output); } // .google.container.v1beta1.MasterAuthorizedNetworksConfig master_authorized_networks_config = 22; if (this->has_master_authorized_networks_config()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 22, this->_internal_master_authorized_networks_config(), output); } // .google.container.v1beta1.MaintenancePolicy maintenance_policy = 23; if (this->has_maintenance_policy()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 23, this->_internal_maintenance_policy(), output); } // .google.container.v1beta1.PodSecurityPolicyConfig pod_security_policy_config = 25; if (this->has_pod_security_policy_config()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 25, this->_internal_pod_security_policy_config(), output); } // string self_link = 100; if (this->self_link().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->self_link().data(), static_cast<int>(this->self_link().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Cluster.self_link"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 100, this->self_link(), output); } // string zone = 101; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Cluster.zone"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 101, this->zone(), output); } // string endpoint = 102; if (this->endpoint().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->endpoint().data(), static_cast<int>(this->endpoint().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Cluster.endpoint"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 102, this->endpoint(), output); } // string initial_cluster_version = 103; if (this->initial_cluster_version().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->initial_cluster_version().data(), static_cast<int>(this->initial_cluster_version().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Cluster.initial_cluster_version"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 103, this->initial_cluster_version(), output); } // string current_master_version = 104; if (this->current_master_version().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->current_master_version().data(), static_cast<int>(this->current_master_version().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Cluster.current_master_version"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 104, this->current_master_version(), output); } // string current_node_version = 105; if (this->current_node_version().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->current_node_version().data(), static_cast<int>(this->current_node_version().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Cluster.current_node_version"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 105, this->current_node_version(), output); } // string create_time = 106; if (this->create_time().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->create_time().data(), static_cast<int>(this->create_time().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Cluster.create_time"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 106, this->create_time(), output); } // .google.container.v1beta1.Cluster.Status status = 107; if (this->status() != 0) { ::google::protobuf::internal::WireFormatLite::WriteEnum( 107, this->status(), output); } // string status_message = 108; if (this->status_message().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->status_message().data(), static_cast<int>(this->status_message().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Cluster.status_message"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 108, this->status_message(), output); } // int32 node_ipv4_cidr_size = 109; if (this->node_ipv4_cidr_size() != 0) { ::google::protobuf::internal::WireFormatLite::WriteInt32(109, this->node_ipv4_cidr_size(), output); } // string services_ipv4_cidr = 110; if (this->services_ipv4_cidr().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->services_ipv4_cidr().data(), static_cast<int>(this->services_ipv4_cidr().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Cluster.services_ipv4_cidr"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 110, this->services_ipv4_cidr(), output); } // repeated string instance_group_urls = 111; for (int i = 0, n = this->instance_group_urls_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->instance_group_urls(i).data(), static_cast<int>(this->instance_group_urls(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Cluster.instance_group_urls"); ::google::protobuf::internal::WireFormatLite::WriteString( 111, this->instance_group_urls(i), output); } // int32 current_node_count = 112; if (this->current_node_count() != 0) { ::google::protobuf::internal::WireFormatLite::WriteInt32(112, this->current_node_count(), output); } // string expire_time = 113; if (this->expire_time().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->expire_time().data(), static_cast<int>(this->expire_time().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Cluster.expire_time"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 113, this->expire_time(), output); } // string location = 114; if (this->location().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->location().data(), static_cast<int>(this->location().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Cluster.location"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 114, this->location(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.Cluster) } ::google::protobuf::uint8* Cluster::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.Cluster) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string name = 1; if (this->name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Cluster.name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->name(), target); } // string description = 2; if (this->description().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->description().data(), static_cast<int>(this->description().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Cluster.description"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->description(), target); } // int32 initial_node_count = 3; if (this->initial_node_count() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->initial_node_count(), target); } // .google.container.v1beta1.NodeConfig node_config = 4; if (this->has_node_config()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 4, this->_internal_node_config(), deterministic, target); } // .google.container.v1beta1.MasterAuth master_auth = 5; if (this->has_master_auth()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 5, this->_internal_master_auth(), deterministic, target); } // string logging_service = 6; if (this->logging_service().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->logging_service().data(), static_cast<int>(this->logging_service().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Cluster.logging_service"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 6, this->logging_service(), target); } // string monitoring_service = 7; if (this->monitoring_service().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->monitoring_service().data(), static_cast<int>(this->monitoring_service().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Cluster.monitoring_service"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 7, this->monitoring_service(), target); } // string network = 8; if (this->network().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->network().data(), static_cast<int>(this->network().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Cluster.network"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 8, this->network(), target); } // string cluster_ipv4_cidr = 9; if (this->cluster_ipv4_cidr().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_ipv4_cidr().data(), static_cast<int>(this->cluster_ipv4_cidr().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Cluster.cluster_ipv4_cidr"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 9, this->cluster_ipv4_cidr(), target); } // .google.container.v1beta1.AddonsConfig addons_config = 10; if (this->has_addons_config()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 10, this->_internal_addons_config(), deterministic, target); } // string subnetwork = 11; if (this->subnetwork().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->subnetwork().data(), static_cast<int>(this->subnetwork().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Cluster.subnetwork"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 11, this->subnetwork(), target); } // repeated .google.container.v1beta1.NodePool node_pools = 12; for (unsigned int i = 0, n = static_cast<unsigned int>(this->node_pools_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 12, this->node_pools(static_cast<int>(i)), deterministic, target); } // repeated string locations = 13; for (int i = 0, n = this->locations_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->locations(i).data(), static_cast<int>(this->locations(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Cluster.locations"); target = ::google::protobuf::internal::WireFormatLite:: WriteStringToArray(13, this->locations(i), target); } // bool enable_kubernetes_alpha = 14; if (this->enable_kubernetes_alpha() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(14, this->enable_kubernetes_alpha(), target); } // .google.container.v1beta1.NetworkPolicy network_policy = 19; if (this->has_network_policy()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 19, this->_internal_network_policy(), deterministic, target); } // .google.container.v1beta1.IPAllocationPolicy ip_allocation_policy = 20; if (this->has_ip_allocation_policy()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 20, this->_internal_ip_allocation_policy(), deterministic, target); } // .google.container.v1beta1.MasterAuthorizedNetworksConfig master_authorized_networks_config = 22; if (this->has_master_authorized_networks_config()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 22, this->_internal_master_authorized_networks_config(), deterministic, target); } // .google.container.v1beta1.MaintenancePolicy maintenance_policy = 23; if (this->has_maintenance_policy()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 23, this->_internal_maintenance_policy(), deterministic, target); } // .google.container.v1beta1.PodSecurityPolicyConfig pod_security_policy_config = 25; if (this->has_pod_security_policy_config()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 25, this->_internal_pod_security_policy_config(), deterministic, target); } // string self_link = 100; if (this->self_link().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->self_link().data(), static_cast<int>(this->self_link().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Cluster.self_link"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 100, this->self_link(), target); } // string zone = 101; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Cluster.zone"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 101, this->zone(), target); } // string endpoint = 102; if (this->endpoint().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->endpoint().data(), static_cast<int>(this->endpoint().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Cluster.endpoint"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 102, this->endpoint(), target); } // string initial_cluster_version = 103; if (this->initial_cluster_version().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->initial_cluster_version().data(), static_cast<int>(this->initial_cluster_version().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Cluster.initial_cluster_version"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 103, this->initial_cluster_version(), target); } // string current_master_version = 104; if (this->current_master_version().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->current_master_version().data(), static_cast<int>(this->current_master_version().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Cluster.current_master_version"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 104, this->current_master_version(), target); } // string current_node_version = 105; if (this->current_node_version().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->current_node_version().data(), static_cast<int>(this->current_node_version().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Cluster.current_node_version"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 105, this->current_node_version(), target); } // string create_time = 106; if (this->create_time().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->create_time().data(), static_cast<int>(this->create_time().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Cluster.create_time"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 106, this->create_time(), target); } // .google.container.v1beta1.Cluster.Status status = 107; if (this->status() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( 107, this->status(), target); } // string status_message = 108; if (this->status_message().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->status_message().data(), static_cast<int>(this->status_message().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Cluster.status_message"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 108, this->status_message(), target); } // int32 node_ipv4_cidr_size = 109; if (this->node_ipv4_cidr_size() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(109, this->node_ipv4_cidr_size(), target); } // string services_ipv4_cidr = 110; if (this->services_ipv4_cidr().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->services_ipv4_cidr().data(), static_cast<int>(this->services_ipv4_cidr().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Cluster.services_ipv4_cidr"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 110, this->services_ipv4_cidr(), target); } // repeated string instance_group_urls = 111; for (int i = 0, n = this->instance_group_urls_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->instance_group_urls(i).data(), static_cast<int>(this->instance_group_urls(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Cluster.instance_group_urls"); target = ::google::protobuf::internal::WireFormatLite:: WriteStringToArray(111, this->instance_group_urls(i), target); } // int32 current_node_count = 112; if (this->current_node_count() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(112, this->current_node_count(), target); } // string expire_time = 113; if (this->expire_time().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->expire_time().data(), static_cast<int>(this->expire_time().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Cluster.expire_time"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 113, this->expire_time(), target); } // string location = 114; if (this->location().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->location().data(), static_cast<int>(this->location().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Cluster.location"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 114, this->location(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.Cluster) return target; } size_t Cluster::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.Cluster) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // repeated .google.container.v1beta1.NodePool node_pools = 12; { unsigned int count = static_cast<unsigned int>(this->node_pools_size()); total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSize( this->node_pools(static_cast<int>(i))); } } // repeated string locations = 13; total_size += 1 * ::google::protobuf::internal::FromIntSize(this->locations_size()); for (int i = 0, n = this->locations_size(); i < n; i++) { total_size += ::google::protobuf::internal::WireFormatLite::StringSize( this->locations(i)); } // repeated string instance_group_urls = 111; total_size += 2 * ::google::protobuf::internal::FromIntSize(this->instance_group_urls_size()); for (int i = 0, n = this->instance_group_urls_size(); i < n; i++) { total_size += ::google::protobuf::internal::WireFormatLite::StringSize( this->instance_group_urls(i)); } // string name = 1; if (this->name().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->name()); } // string description = 2; if (this->description().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->description()); } // string logging_service = 6; if (this->logging_service().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->logging_service()); } // string monitoring_service = 7; if (this->monitoring_service().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->monitoring_service()); } // string network = 8; if (this->network().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->network()); } // string cluster_ipv4_cidr = 9; if (this->cluster_ipv4_cidr().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->cluster_ipv4_cidr()); } // string subnetwork = 11; if (this->subnetwork().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->subnetwork()); } // string self_link = 100; if (this->self_link().size() > 0) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( this->self_link()); } // string zone = 101; if (this->zone().size() > 0) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( this->zone()); } // string endpoint = 102; if (this->endpoint().size() > 0) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( this->endpoint()); } // string initial_cluster_version = 103; if (this->initial_cluster_version().size() > 0) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( this->initial_cluster_version()); } // string current_master_version = 104; if (this->current_master_version().size() > 0) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( this->current_master_version()); } // string current_node_version = 105; if (this->current_node_version().size() > 0) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( this->current_node_version()); } // string create_time = 106; if (this->create_time().size() > 0) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( this->create_time()); } // string status_message = 108; if (this->status_message().size() > 0) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( this->status_message()); } // string services_ipv4_cidr = 110; if (this->services_ipv4_cidr().size() > 0) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( this->services_ipv4_cidr()); } // string expire_time = 113; if (this->expire_time().size() > 0) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( this->expire_time()); } // string location = 114; if (this->location().size() > 0) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( this->location()); } // .google.container.v1beta1.NodeConfig node_config = 4; if (this->has_node_config()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *node_config_); } // .google.container.v1beta1.MasterAuth master_auth = 5; if (this->has_master_auth()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *master_auth_); } // .google.container.v1beta1.AddonsConfig addons_config = 10; if (this->has_addons_config()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *addons_config_); } // .google.container.v1beta1.NetworkPolicy network_policy = 19; if (this->has_network_policy()) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::MessageSize( *network_policy_); } // .google.container.v1beta1.IPAllocationPolicy ip_allocation_policy = 20; if (this->has_ip_allocation_policy()) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::MessageSize( *ip_allocation_policy_); } // .google.container.v1beta1.MasterAuthorizedNetworksConfig master_authorized_networks_config = 22; if (this->has_master_authorized_networks_config()) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::MessageSize( *master_authorized_networks_config_); } // .google.container.v1beta1.MaintenancePolicy maintenance_policy = 23; if (this->has_maintenance_policy()) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::MessageSize( *maintenance_policy_); } // .google.container.v1beta1.PodSecurityPolicyConfig pod_security_policy_config = 25; if (this->has_pod_security_policy_config()) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::MessageSize( *pod_security_policy_config_); } // int32 initial_node_count = 3; if (this->initial_node_count() != 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( this->initial_node_count()); } // bool enable_kubernetes_alpha = 14; if (this->enable_kubernetes_alpha() != 0) { total_size += 1 + 1; } // int32 current_node_count = 112; if (this->current_node_count() != 0) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::Int32Size( this->current_node_count()); } // .google.container.v1beta1.Cluster.Status status = 107; if (this->status() != 0) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::EnumSize(this->status()); } // int32 node_ipv4_cidr_size = 109; if (this->node_ipv4_cidr_size() != 0) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::Int32Size( this->node_ipv4_cidr_size()); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void Cluster::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.Cluster) GOOGLE_DCHECK_NE(&from, this); const Cluster* source = ::google::protobuf::internal::DynamicCastToGenerated<const Cluster>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.Cluster) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.Cluster) MergeFrom(*source); } } void Cluster::MergeFrom(const Cluster& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.Cluster) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; node_pools_.MergeFrom(from.node_pools_); locations_.MergeFrom(from.locations_); instance_group_urls_.MergeFrom(from.instance_group_urls_); if (from.name().size() > 0) { name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } if (from.description().size() > 0) { description_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.description_); } if (from.logging_service().size() > 0) { logging_service_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.logging_service_); } if (from.monitoring_service().size() > 0) { monitoring_service_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.monitoring_service_); } if (from.network().size() > 0) { network_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.network_); } if (from.cluster_ipv4_cidr().size() > 0) { cluster_ipv4_cidr_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cluster_ipv4_cidr_); } if (from.subnetwork().size() > 0) { subnetwork_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.subnetwork_); } if (from.self_link().size() > 0) { self_link_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.self_link_); } if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } if (from.endpoint().size() > 0) { endpoint_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.endpoint_); } if (from.initial_cluster_version().size() > 0) { initial_cluster_version_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.initial_cluster_version_); } if (from.current_master_version().size() > 0) { current_master_version_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.current_master_version_); } if (from.current_node_version().size() > 0) { current_node_version_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.current_node_version_); } if (from.create_time().size() > 0) { create_time_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.create_time_); } if (from.status_message().size() > 0) { status_message_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.status_message_); } if (from.services_ipv4_cidr().size() > 0) { services_ipv4_cidr_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.services_ipv4_cidr_); } if (from.expire_time().size() > 0) { expire_time_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.expire_time_); } if (from.location().size() > 0) { location_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.location_); } if (from.has_node_config()) { mutable_node_config()->::google::container::v1beta1::NodeConfig::MergeFrom(from.node_config()); } if (from.has_master_auth()) { mutable_master_auth()->::google::container::v1beta1::MasterAuth::MergeFrom(from.master_auth()); } if (from.has_addons_config()) { mutable_addons_config()->::google::container::v1beta1::AddonsConfig::MergeFrom(from.addons_config()); } if (from.has_network_policy()) { mutable_network_policy()->::google::container::v1beta1::NetworkPolicy::MergeFrom(from.network_policy()); } if (from.has_ip_allocation_policy()) { mutable_ip_allocation_policy()->::google::container::v1beta1::IPAllocationPolicy::MergeFrom(from.ip_allocation_policy()); } if (from.has_master_authorized_networks_config()) { mutable_master_authorized_networks_config()->::google::container::v1beta1::MasterAuthorizedNetworksConfig::MergeFrom(from.master_authorized_networks_config()); } if (from.has_maintenance_policy()) { mutable_maintenance_policy()->::google::container::v1beta1::MaintenancePolicy::MergeFrom(from.maintenance_policy()); } if (from.has_pod_security_policy_config()) { mutable_pod_security_policy_config()->::google::container::v1beta1::PodSecurityPolicyConfig::MergeFrom(from.pod_security_policy_config()); } if (from.initial_node_count() != 0) { set_initial_node_count(from.initial_node_count()); } if (from.enable_kubernetes_alpha() != 0) { set_enable_kubernetes_alpha(from.enable_kubernetes_alpha()); } if (from.current_node_count() != 0) { set_current_node_count(from.current_node_count()); } if (from.status() != 0) { set_status(from.status()); } if (from.node_ipv4_cidr_size() != 0) { set_node_ipv4_cidr_size(from.node_ipv4_cidr_size()); } } void Cluster::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.Cluster) if (&from == this) return; Clear(); MergeFrom(from); } void Cluster::CopyFrom(const Cluster& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.Cluster) if (&from == this) return; Clear(); MergeFrom(from); } bool Cluster::IsInitialized() const { return true; } void Cluster::Swap(Cluster* other) { if (other == this) return; InternalSwap(other); } void Cluster::InternalSwap(Cluster* other) { using std::swap; CastToBase(&node_pools_)->InternalSwap(CastToBase(&other->node_pools_)); locations_.InternalSwap(CastToBase(&other->locations_)); instance_group_urls_.InternalSwap(CastToBase(&other->instance_group_urls_)); name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); description_.Swap(&other->description_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); logging_service_.Swap(&other->logging_service_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); monitoring_service_.Swap(&other->monitoring_service_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); network_.Swap(&other->network_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); cluster_ipv4_cidr_.Swap(&other->cluster_ipv4_cidr_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); subnetwork_.Swap(&other->subnetwork_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); self_link_.Swap(&other->self_link_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); zone_.Swap(&other->zone_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); endpoint_.Swap(&other->endpoint_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); initial_cluster_version_.Swap(&other->initial_cluster_version_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); current_master_version_.Swap(&other->current_master_version_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); current_node_version_.Swap(&other->current_node_version_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); create_time_.Swap(&other->create_time_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); status_message_.Swap(&other->status_message_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); services_ipv4_cidr_.Swap(&other->services_ipv4_cidr_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); expire_time_.Swap(&other->expire_time_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); location_.Swap(&other->location_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(node_config_, other->node_config_); swap(master_auth_, other->master_auth_); swap(addons_config_, other->addons_config_); swap(network_policy_, other->network_policy_); swap(ip_allocation_policy_, other->ip_allocation_policy_); swap(master_authorized_networks_config_, other->master_authorized_networks_config_); swap(maintenance_policy_, other->maintenance_policy_); swap(pod_security_policy_config_, other->pod_security_policy_config_); swap(initial_node_count_, other->initial_node_count_); swap(enable_kubernetes_alpha_, other->enable_kubernetes_alpha_); swap(current_node_count_, other->current_node_count_); swap(status_, other->status_); swap(node_ipv4_cidr_size_, other->node_ipv4_cidr_size_); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata Cluster::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void ClusterUpdate::InitAsDefaultInstance() { ::google::container::v1beta1::_ClusterUpdate_default_instance_._instance.get_mutable()->desired_addons_config_ = const_cast< ::google::container::v1beta1::AddonsConfig*>( ::google::container::v1beta1::AddonsConfig::internal_default_instance()); ::google::container::v1beta1::_ClusterUpdate_default_instance_._instance.get_mutable()->desired_node_pool_autoscaling_ = const_cast< ::google::container::v1beta1::NodePoolAutoscaling*>( ::google::container::v1beta1::NodePoolAutoscaling::internal_default_instance()); ::google::container::v1beta1::_ClusterUpdate_default_instance_._instance.get_mutable()->desired_master_authorized_networks_config_ = const_cast< ::google::container::v1beta1::MasterAuthorizedNetworksConfig*>( ::google::container::v1beta1::MasterAuthorizedNetworksConfig::internal_default_instance()); ::google::container::v1beta1::_ClusterUpdate_default_instance_._instance.get_mutable()->desired_pod_security_policy_config_ = const_cast< ::google::container::v1beta1::PodSecurityPolicyConfig*>( ::google::container::v1beta1::PodSecurityPolicyConfig::internal_default_instance()); } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int ClusterUpdate::kDesiredNodeVersionFieldNumber; const int ClusterUpdate::kDesiredMonitoringServiceFieldNumber; const int ClusterUpdate::kDesiredAddonsConfigFieldNumber; const int ClusterUpdate::kDesiredNodePoolIdFieldNumber; const int ClusterUpdate::kDesiredImageTypeFieldNumber; const int ClusterUpdate::kDesiredNodePoolAutoscalingFieldNumber; const int ClusterUpdate::kDesiredLocationsFieldNumber; const int ClusterUpdate::kDesiredMasterAuthorizedNetworksConfigFieldNumber; const int ClusterUpdate::kDesiredPodSecurityPolicyConfigFieldNumber; const int ClusterUpdate::kDesiredMasterVersionFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 ClusterUpdate::ClusterUpdate() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_ClusterUpdate.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.ClusterUpdate) } ClusterUpdate::ClusterUpdate(const ClusterUpdate& from) : ::google::protobuf::Message(), _internal_metadata_(NULL), desired_locations_(from.desired_locations_) { _internal_metadata_.MergeFrom(from._internal_metadata_); desired_node_version_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.desired_node_version().size() > 0) { desired_node_version_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.desired_node_version_); } desired_monitoring_service_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.desired_monitoring_service().size() > 0) { desired_monitoring_service_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.desired_monitoring_service_); } desired_node_pool_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.desired_node_pool_id().size() > 0) { desired_node_pool_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.desired_node_pool_id_); } desired_image_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.desired_image_type().size() > 0) { desired_image_type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.desired_image_type_); } desired_master_version_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.desired_master_version().size() > 0) { desired_master_version_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.desired_master_version_); } if (from.has_desired_addons_config()) { desired_addons_config_ = new ::google::container::v1beta1::AddonsConfig(*from.desired_addons_config_); } else { desired_addons_config_ = NULL; } if (from.has_desired_node_pool_autoscaling()) { desired_node_pool_autoscaling_ = new ::google::container::v1beta1::NodePoolAutoscaling(*from.desired_node_pool_autoscaling_); } else { desired_node_pool_autoscaling_ = NULL; } if (from.has_desired_master_authorized_networks_config()) { desired_master_authorized_networks_config_ = new ::google::container::v1beta1::MasterAuthorizedNetworksConfig(*from.desired_master_authorized_networks_config_); } else { desired_master_authorized_networks_config_ = NULL; } if (from.has_desired_pod_security_policy_config()) { desired_pod_security_policy_config_ = new ::google::container::v1beta1::PodSecurityPolicyConfig(*from.desired_pod_security_policy_config_); } else { desired_pod_security_policy_config_ = NULL; } // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.ClusterUpdate) } void ClusterUpdate::SharedCtor() { desired_node_version_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); desired_monitoring_service_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); desired_node_pool_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); desired_image_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); desired_master_version_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); ::memset(&desired_addons_config_, 0, static_cast<size_t>( reinterpret_cast<char*>(&desired_pod_security_policy_config_) - reinterpret_cast<char*>(&desired_addons_config_)) + sizeof(desired_pod_security_policy_config_)); } ClusterUpdate::~ClusterUpdate() { // @@protoc_insertion_point(destructor:google.container.v1beta1.ClusterUpdate) SharedDtor(); } void ClusterUpdate::SharedDtor() { desired_node_version_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); desired_monitoring_service_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); desired_node_pool_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); desired_image_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); desired_master_version_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete desired_addons_config_; if (this != internal_default_instance()) delete desired_node_pool_autoscaling_; if (this != internal_default_instance()) delete desired_master_authorized_networks_config_; if (this != internal_default_instance()) delete desired_pod_security_policy_config_; } void ClusterUpdate::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* ClusterUpdate::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const ClusterUpdate& ClusterUpdate::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_ClusterUpdate.base); return *internal_default_instance(); } void ClusterUpdate::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.ClusterUpdate) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; desired_locations_.Clear(); desired_node_version_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); desired_monitoring_service_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); desired_node_pool_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); desired_image_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); desired_master_version_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (GetArenaNoVirtual() == NULL && desired_addons_config_ != NULL) { delete desired_addons_config_; } desired_addons_config_ = NULL; if (GetArenaNoVirtual() == NULL && desired_node_pool_autoscaling_ != NULL) { delete desired_node_pool_autoscaling_; } desired_node_pool_autoscaling_ = NULL; if (GetArenaNoVirtual() == NULL && desired_master_authorized_networks_config_ != NULL) { delete desired_master_authorized_networks_config_; } desired_master_authorized_networks_config_ = NULL; if (GetArenaNoVirtual() == NULL && desired_pod_security_policy_config_ != NULL) { delete desired_pod_security_policy_config_; } desired_pod_security_policy_config_ = NULL; _internal_metadata_.Clear(); } bool ClusterUpdate::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.ClusterUpdate) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string desired_node_version = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_desired_node_version())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->desired_node_version().data(), static_cast<int>(this->desired_node_version().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.ClusterUpdate.desired_node_version")); } else { goto handle_unusual; } break; } // string desired_monitoring_service = 5; case 5: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_desired_monitoring_service())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->desired_monitoring_service().data(), static_cast<int>(this->desired_monitoring_service().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.ClusterUpdate.desired_monitoring_service")); } else { goto handle_unusual; } break; } // .google.container.v1beta1.AddonsConfig desired_addons_config = 6; case 6: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, mutable_desired_addons_config())); } else { goto handle_unusual; } break; } // string desired_node_pool_id = 7; case 7: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_desired_node_pool_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->desired_node_pool_id().data(), static_cast<int>(this->desired_node_pool_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.ClusterUpdate.desired_node_pool_id")); } else { goto handle_unusual; } break; } // string desired_image_type = 8; case 8: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_desired_image_type())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->desired_image_type().data(), static_cast<int>(this->desired_image_type().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.ClusterUpdate.desired_image_type")); } else { goto handle_unusual; } break; } // .google.container.v1beta1.NodePoolAutoscaling desired_node_pool_autoscaling = 9; case 9: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(74u /* 74 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, mutable_desired_node_pool_autoscaling())); } else { goto handle_unusual; } break; } // repeated string desired_locations = 10; case 10: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(82u /* 82 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->add_desired_locations())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->desired_locations(this->desired_locations_size() - 1).data(), static_cast<int>(this->desired_locations(this->desired_locations_size() - 1).length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.ClusterUpdate.desired_locations")); } else { goto handle_unusual; } break; } // .google.container.v1beta1.MasterAuthorizedNetworksConfig desired_master_authorized_networks_config = 12; case 12: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(98u /* 98 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, mutable_desired_master_authorized_networks_config())); } else { goto handle_unusual; } break; } // .google.container.v1beta1.PodSecurityPolicyConfig desired_pod_security_policy_config = 14; case 14: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(114u /* 114 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, mutable_desired_pod_security_policy_config())); } else { goto handle_unusual; } break; } // string desired_master_version = 100; case 100: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(34u /* 802 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_desired_master_version())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->desired_master_version().data(), static_cast<int>(this->desired_master_version().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.ClusterUpdate.desired_master_version")); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.ClusterUpdate) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.ClusterUpdate) return false; #undef DO_ } void ClusterUpdate::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.ClusterUpdate) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string desired_node_version = 4; if (this->desired_node_version().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->desired_node_version().data(), static_cast<int>(this->desired_node_version().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.ClusterUpdate.desired_node_version"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 4, this->desired_node_version(), output); } // string desired_monitoring_service = 5; if (this->desired_monitoring_service().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->desired_monitoring_service().data(), static_cast<int>(this->desired_monitoring_service().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.ClusterUpdate.desired_monitoring_service"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 5, this->desired_monitoring_service(), output); } // .google.container.v1beta1.AddonsConfig desired_addons_config = 6; if (this->has_desired_addons_config()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 6, this->_internal_desired_addons_config(), output); } // string desired_node_pool_id = 7; if (this->desired_node_pool_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->desired_node_pool_id().data(), static_cast<int>(this->desired_node_pool_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.ClusterUpdate.desired_node_pool_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 7, this->desired_node_pool_id(), output); } // string desired_image_type = 8; if (this->desired_image_type().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->desired_image_type().data(), static_cast<int>(this->desired_image_type().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.ClusterUpdate.desired_image_type"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 8, this->desired_image_type(), output); } // .google.container.v1beta1.NodePoolAutoscaling desired_node_pool_autoscaling = 9; if (this->has_desired_node_pool_autoscaling()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 9, this->_internal_desired_node_pool_autoscaling(), output); } // repeated string desired_locations = 10; for (int i = 0, n = this->desired_locations_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->desired_locations(i).data(), static_cast<int>(this->desired_locations(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.ClusterUpdate.desired_locations"); ::google::protobuf::internal::WireFormatLite::WriteString( 10, this->desired_locations(i), output); } // .google.container.v1beta1.MasterAuthorizedNetworksConfig desired_master_authorized_networks_config = 12; if (this->has_desired_master_authorized_networks_config()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 12, this->_internal_desired_master_authorized_networks_config(), output); } // .google.container.v1beta1.PodSecurityPolicyConfig desired_pod_security_policy_config = 14; if (this->has_desired_pod_security_policy_config()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 14, this->_internal_desired_pod_security_policy_config(), output); } // string desired_master_version = 100; if (this->desired_master_version().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->desired_master_version().data(), static_cast<int>(this->desired_master_version().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.ClusterUpdate.desired_master_version"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 100, this->desired_master_version(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.ClusterUpdate) } ::google::protobuf::uint8* ClusterUpdate::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.ClusterUpdate) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string desired_node_version = 4; if (this->desired_node_version().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->desired_node_version().data(), static_cast<int>(this->desired_node_version().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.ClusterUpdate.desired_node_version"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 4, this->desired_node_version(), target); } // string desired_monitoring_service = 5; if (this->desired_monitoring_service().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->desired_monitoring_service().data(), static_cast<int>(this->desired_monitoring_service().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.ClusterUpdate.desired_monitoring_service"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 5, this->desired_monitoring_service(), target); } // .google.container.v1beta1.AddonsConfig desired_addons_config = 6; if (this->has_desired_addons_config()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 6, this->_internal_desired_addons_config(), deterministic, target); } // string desired_node_pool_id = 7; if (this->desired_node_pool_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->desired_node_pool_id().data(), static_cast<int>(this->desired_node_pool_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.ClusterUpdate.desired_node_pool_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 7, this->desired_node_pool_id(), target); } // string desired_image_type = 8; if (this->desired_image_type().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->desired_image_type().data(), static_cast<int>(this->desired_image_type().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.ClusterUpdate.desired_image_type"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 8, this->desired_image_type(), target); } // .google.container.v1beta1.NodePoolAutoscaling desired_node_pool_autoscaling = 9; if (this->has_desired_node_pool_autoscaling()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 9, this->_internal_desired_node_pool_autoscaling(), deterministic, target); } // repeated string desired_locations = 10; for (int i = 0, n = this->desired_locations_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->desired_locations(i).data(), static_cast<int>(this->desired_locations(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.ClusterUpdate.desired_locations"); target = ::google::protobuf::internal::WireFormatLite:: WriteStringToArray(10, this->desired_locations(i), target); } // .google.container.v1beta1.MasterAuthorizedNetworksConfig desired_master_authorized_networks_config = 12; if (this->has_desired_master_authorized_networks_config()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 12, this->_internal_desired_master_authorized_networks_config(), deterministic, target); } // .google.container.v1beta1.PodSecurityPolicyConfig desired_pod_security_policy_config = 14; if (this->has_desired_pod_security_policy_config()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 14, this->_internal_desired_pod_security_policy_config(), deterministic, target); } // string desired_master_version = 100; if (this->desired_master_version().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->desired_master_version().data(), static_cast<int>(this->desired_master_version().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.ClusterUpdate.desired_master_version"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 100, this->desired_master_version(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.ClusterUpdate) return target; } size_t ClusterUpdate::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.ClusterUpdate) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // repeated string desired_locations = 10; total_size += 1 * ::google::protobuf::internal::FromIntSize(this->desired_locations_size()); for (int i = 0, n = this->desired_locations_size(); i < n; i++) { total_size += ::google::protobuf::internal::WireFormatLite::StringSize( this->desired_locations(i)); } // string desired_node_version = 4; if (this->desired_node_version().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->desired_node_version()); } // string desired_monitoring_service = 5; if (this->desired_monitoring_service().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->desired_monitoring_service()); } // string desired_node_pool_id = 7; if (this->desired_node_pool_id().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->desired_node_pool_id()); } // string desired_image_type = 8; if (this->desired_image_type().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->desired_image_type()); } // string desired_master_version = 100; if (this->desired_master_version().size() > 0) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( this->desired_master_version()); } // .google.container.v1beta1.AddonsConfig desired_addons_config = 6; if (this->has_desired_addons_config()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *desired_addons_config_); } // .google.container.v1beta1.NodePoolAutoscaling desired_node_pool_autoscaling = 9; if (this->has_desired_node_pool_autoscaling()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *desired_node_pool_autoscaling_); } // .google.container.v1beta1.MasterAuthorizedNetworksConfig desired_master_authorized_networks_config = 12; if (this->has_desired_master_authorized_networks_config()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *desired_master_authorized_networks_config_); } // .google.container.v1beta1.PodSecurityPolicyConfig desired_pod_security_policy_config = 14; if (this->has_desired_pod_security_policy_config()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *desired_pod_security_policy_config_); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void ClusterUpdate::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.ClusterUpdate) GOOGLE_DCHECK_NE(&from, this); const ClusterUpdate* source = ::google::protobuf::internal::DynamicCastToGenerated<const ClusterUpdate>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.ClusterUpdate) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.ClusterUpdate) MergeFrom(*source); } } void ClusterUpdate::MergeFrom(const ClusterUpdate& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.ClusterUpdate) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; desired_locations_.MergeFrom(from.desired_locations_); if (from.desired_node_version().size() > 0) { desired_node_version_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.desired_node_version_); } if (from.desired_monitoring_service().size() > 0) { desired_monitoring_service_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.desired_monitoring_service_); } if (from.desired_node_pool_id().size() > 0) { desired_node_pool_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.desired_node_pool_id_); } if (from.desired_image_type().size() > 0) { desired_image_type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.desired_image_type_); } if (from.desired_master_version().size() > 0) { desired_master_version_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.desired_master_version_); } if (from.has_desired_addons_config()) { mutable_desired_addons_config()->::google::container::v1beta1::AddonsConfig::MergeFrom(from.desired_addons_config()); } if (from.has_desired_node_pool_autoscaling()) { mutable_desired_node_pool_autoscaling()->::google::container::v1beta1::NodePoolAutoscaling::MergeFrom(from.desired_node_pool_autoscaling()); } if (from.has_desired_master_authorized_networks_config()) { mutable_desired_master_authorized_networks_config()->::google::container::v1beta1::MasterAuthorizedNetworksConfig::MergeFrom(from.desired_master_authorized_networks_config()); } if (from.has_desired_pod_security_policy_config()) { mutable_desired_pod_security_policy_config()->::google::container::v1beta1::PodSecurityPolicyConfig::MergeFrom(from.desired_pod_security_policy_config()); } } void ClusterUpdate::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.ClusterUpdate) if (&from == this) return; Clear(); MergeFrom(from); } void ClusterUpdate::CopyFrom(const ClusterUpdate& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.ClusterUpdate) if (&from == this) return; Clear(); MergeFrom(from); } bool ClusterUpdate::IsInitialized() const { return true; } void ClusterUpdate::Swap(ClusterUpdate* other) { if (other == this) return; InternalSwap(other); } void ClusterUpdate::InternalSwap(ClusterUpdate* other) { using std::swap; desired_locations_.InternalSwap(CastToBase(&other->desired_locations_)); desired_node_version_.Swap(&other->desired_node_version_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); desired_monitoring_service_.Swap(&other->desired_monitoring_service_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); desired_node_pool_id_.Swap(&other->desired_node_pool_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); desired_image_type_.Swap(&other->desired_image_type_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); desired_master_version_.Swap(&other->desired_master_version_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(desired_addons_config_, other->desired_addons_config_); swap(desired_node_pool_autoscaling_, other->desired_node_pool_autoscaling_); swap(desired_master_authorized_networks_config_, other->desired_master_authorized_networks_config_); swap(desired_pod_security_policy_config_, other->desired_pod_security_policy_config_); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata ClusterUpdate::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void Operation::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int Operation::kNameFieldNumber; const int Operation::kZoneFieldNumber; const int Operation::kOperationTypeFieldNumber; const int Operation::kStatusFieldNumber; const int Operation::kDetailFieldNumber; const int Operation::kStatusMessageFieldNumber; const int Operation::kSelfLinkFieldNumber; const int Operation::kTargetLinkFieldNumber; const int Operation::kLocationFieldNumber; const int Operation::kStartTimeFieldNumber; const int Operation::kEndTimeFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 Operation::Operation() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_Operation.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.Operation) } Operation::Operation(const Operation& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.name().size() > 0) { name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } status_message_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.status_message().size() > 0) { status_message_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.status_message_); } self_link_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.self_link().size() > 0) { self_link_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.self_link_); } target_link_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.target_link().size() > 0) { target_link_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.target_link_); } detail_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.detail().size() > 0) { detail_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.detail_); } location_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.location().size() > 0) { location_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.location_); } start_time_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.start_time().size() > 0) { start_time_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.start_time_); } end_time_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.end_time().size() > 0) { end_time_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.end_time_); } ::memcpy(&operation_type_, &from.operation_type_, static_cast<size_t>(reinterpret_cast<char*>(&status_) - reinterpret_cast<char*>(&operation_type_)) + sizeof(status_)); // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.Operation) } void Operation::SharedCtor() { name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); status_message_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); self_link_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); target_link_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); detail_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); location_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); start_time_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); end_time_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); ::memset(&operation_type_, 0, static_cast<size_t>( reinterpret_cast<char*>(&status_) - reinterpret_cast<char*>(&operation_type_)) + sizeof(status_)); } Operation::~Operation() { // @@protoc_insertion_point(destructor:google.container.v1beta1.Operation) SharedDtor(); } void Operation::SharedDtor() { name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); status_message_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); self_link_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); target_link_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); detail_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); location_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); start_time_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); end_time_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } void Operation::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* Operation::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const Operation& Operation::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_Operation.base); return *internal_default_instance(); } void Operation::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.Operation) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); status_message_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); self_link_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); target_link_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); detail_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); location_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); start_time_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); end_time_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); ::memset(&operation_type_, 0, static_cast<size_t>( reinterpret_cast<char*>(&status_) - reinterpret_cast<char*>(&operation_type_)) + sizeof(status_)); _internal_metadata_.Clear(); } bool Operation::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.Operation) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string name = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_name())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.Operation.name")); } else { goto handle_unusual; } break; } // string zone = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_zone())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.Operation.zone")); } else { goto handle_unusual; } break; } // .google.container.v1beta1.Operation.Type operation_type = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( input, &value))); set_operation_type(static_cast< ::google::container::v1beta1::Operation_Type >(value)); } else { goto handle_unusual; } break; } // .google.container.v1beta1.Operation.Status status = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) { int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( input, &value))); set_status(static_cast< ::google::container::v1beta1::Operation_Status >(value)); } else { goto handle_unusual; } break; } // string status_message = 5; case 5: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_status_message())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->status_message().data(), static_cast<int>(this->status_message().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.Operation.status_message")); } else { goto handle_unusual; } break; } // string self_link = 6; case 6: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_self_link())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->self_link().data(), static_cast<int>(this->self_link().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.Operation.self_link")); } else { goto handle_unusual; } break; } // string target_link = 7; case 7: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_target_link())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->target_link().data(), static_cast<int>(this->target_link().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.Operation.target_link")); } else { goto handle_unusual; } break; } // string detail = 8; case 8: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_detail())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->detail().data(), static_cast<int>(this->detail().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.Operation.detail")); } else { goto handle_unusual; } break; } // string location = 9; case 9: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(74u /* 74 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_location())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->location().data(), static_cast<int>(this->location().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.Operation.location")); } else { goto handle_unusual; } break; } // string start_time = 10; case 10: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(82u /* 82 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_start_time())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->start_time().data(), static_cast<int>(this->start_time().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.Operation.start_time")); } else { goto handle_unusual; } break; } // string end_time = 11; case 11: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(90u /* 90 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_end_time())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->end_time().data(), static_cast<int>(this->end_time().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.Operation.end_time")); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.Operation) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.Operation) return false; #undef DO_ } void Operation::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.Operation) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string name = 1; if (this->name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Operation.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->name(), output); } // string zone = 2; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Operation.zone"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->zone(), output); } // .google.container.v1beta1.Operation.Type operation_type = 3; if (this->operation_type() != 0) { ::google::protobuf::internal::WireFormatLite::WriteEnum( 3, this->operation_type(), output); } // .google.container.v1beta1.Operation.Status status = 4; if (this->status() != 0) { ::google::protobuf::internal::WireFormatLite::WriteEnum( 4, this->status(), output); } // string status_message = 5; if (this->status_message().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->status_message().data(), static_cast<int>(this->status_message().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Operation.status_message"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 5, this->status_message(), output); } // string self_link = 6; if (this->self_link().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->self_link().data(), static_cast<int>(this->self_link().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Operation.self_link"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 6, this->self_link(), output); } // string target_link = 7; if (this->target_link().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->target_link().data(), static_cast<int>(this->target_link().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Operation.target_link"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 7, this->target_link(), output); } // string detail = 8; if (this->detail().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->detail().data(), static_cast<int>(this->detail().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Operation.detail"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 8, this->detail(), output); } // string location = 9; if (this->location().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->location().data(), static_cast<int>(this->location().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Operation.location"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 9, this->location(), output); } // string start_time = 10; if (this->start_time().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->start_time().data(), static_cast<int>(this->start_time().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Operation.start_time"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 10, this->start_time(), output); } // string end_time = 11; if (this->end_time().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->end_time().data(), static_cast<int>(this->end_time().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Operation.end_time"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 11, this->end_time(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.Operation) } ::google::protobuf::uint8* Operation::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.Operation) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string name = 1; if (this->name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Operation.name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->name(), target); } // string zone = 2; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Operation.zone"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->zone(), target); } // .google.container.v1beta1.Operation.Type operation_type = 3; if (this->operation_type() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( 3, this->operation_type(), target); } // .google.container.v1beta1.Operation.Status status = 4; if (this->status() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( 4, this->status(), target); } // string status_message = 5; if (this->status_message().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->status_message().data(), static_cast<int>(this->status_message().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Operation.status_message"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 5, this->status_message(), target); } // string self_link = 6; if (this->self_link().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->self_link().data(), static_cast<int>(this->self_link().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Operation.self_link"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 6, this->self_link(), target); } // string target_link = 7; if (this->target_link().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->target_link().data(), static_cast<int>(this->target_link().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Operation.target_link"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 7, this->target_link(), target); } // string detail = 8; if (this->detail().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->detail().data(), static_cast<int>(this->detail().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Operation.detail"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 8, this->detail(), target); } // string location = 9; if (this->location().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->location().data(), static_cast<int>(this->location().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Operation.location"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 9, this->location(), target); } // string start_time = 10; if (this->start_time().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->start_time().data(), static_cast<int>(this->start_time().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Operation.start_time"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 10, this->start_time(), target); } // string end_time = 11; if (this->end_time().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->end_time().data(), static_cast<int>(this->end_time().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.Operation.end_time"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 11, this->end_time(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.Operation) return target; } size_t Operation::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.Operation) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // string name = 1; if (this->name().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->name()); } // string zone = 2; if (this->zone().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->zone()); } // string status_message = 5; if (this->status_message().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->status_message()); } // string self_link = 6; if (this->self_link().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->self_link()); } // string target_link = 7; if (this->target_link().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->target_link()); } // string detail = 8; if (this->detail().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->detail()); } // string location = 9; if (this->location().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->location()); } // string start_time = 10; if (this->start_time().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->start_time()); } // string end_time = 11; if (this->end_time().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->end_time()); } // .google.container.v1beta1.Operation.Type operation_type = 3; if (this->operation_type() != 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::EnumSize(this->operation_type()); } // .google.container.v1beta1.Operation.Status status = 4; if (this->status() != 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::EnumSize(this->status()); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void Operation::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.Operation) GOOGLE_DCHECK_NE(&from, this); const Operation* source = ::google::protobuf::internal::DynamicCastToGenerated<const Operation>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.Operation) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.Operation) MergeFrom(*source); } } void Operation::MergeFrom(const Operation& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.Operation) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.name().size() > 0) { name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } if (from.status_message().size() > 0) { status_message_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.status_message_); } if (from.self_link().size() > 0) { self_link_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.self_link_); } if (from.target_link().size() > 0) { target_link_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.target_link_); } if (from.detail().size() > 0) { detail_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.detail_); } if (from.location().size() > 0) { location_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.location_); } if (from.start_time().size() > 0) { start_time_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.start_time_); } if (from.end_time().size() > 0) { end_time_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.end_time_); } if (from.operation_type() != 0) { set_operation_type(from.operation_type()); } if (from.status() != 0) { set_status(from.status()); } } void Operation::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.Operation) if (&from == this) return; Clear(); MergeFrom(from); } void Operation::CopyFrom(const Operation& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.Operation) if (&from == this) return; Clear(); MergeFrom(from); } bool Operation::IsInitialized() const { return true; } void Operation::Swap(Operation* other) { if (other == this) return; InternalSwap(other); } void Operation::InternalSwap(Operation* other) { using std::swap; name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); zone_.Swap(&other->zone_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); status_message_.Swap(&other->status_message_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); self_link_.Swap(&other->self_link_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); target_link_.Swap(&other->target_link_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); detail_.Swap(&other->detail_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); location_.Swap(&other->location_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); start_time_.Swap(&other->start_time_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); end_time_.Swap(&other->end_time_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(operation_type_, other->operation_type_); swap(status_, other->status_); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata Operation::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void CreateClusterRequest::InitAsDefaultInstance() { ::google::container::v1beta1::_CreateClusterRequest_default_instance_._instance.get_mutable()->cluster_ = const_cast< ::google::container::v1beta1::Cluster*>( ::google::container::v1beta1::Cluster::internal_default_instance()); } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int CreateClusterRequest::kProjectIdFieldNumber; const int CreateClusterRequest::kZoneFieldNumber; const int CreateClusterRequest::kClusterFieldNumber; const int CreateClusterRequest::kParentFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 CreateClusterRequest::CreateClusterRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_CreateClusterRequest.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.CreateClusterRequest) } CreateClusterRequest::CreateClusterRequest(const CreateClusterRequest& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); project_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.project_id().size() > 0) { project_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_id_); } zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.parent().size() > 0) { parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_); } if (from.has_cluster()) { cluster_ = new ::google::container::v1beta1::Cluster(*from.cluster_); } else { cluster_ = NULL; } // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.CreateClusterRequest) } void CreateClusterRequest::SharedCtor() { project_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_ = NULL; } CreateClusterRequest::~CreateClusterRequest() { // @@protoc_insertion_point(destructor:google.container.v1beta1.CreateClusterRequest) SharedDtor(); } void CreateClusterRequest::SharedDtor() { project_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); parent_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete cluster_; } void CreateClusterRequest::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* CreateClusterRequest::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const CreateClusterRequest& CreateClusterRequest::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_CreateClusterRequest.base); return *internal_default_instance(); } void CreateClusterRequest::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.CreateClusterRequest) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; project_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); parent_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (GetArenaNoVirtual() == NULL && cluster_ != NULL) { delete cluster_; } cluster_ = NULL; _internal_metadata_.Clear(); } bool CreateClusterRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.CreateClusterRequest) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string project_id = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_project_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.CreateClusterRequest.project_id")); } else { goto handle_unusual; } break; } // string zone = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_zone())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.CreateClusterRequest.zone")); } else { goto handle_unusual; } break; } // .google.container.v1beta1.Cluster cluster = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, mutable_cluster())); } else { goto handle_unusual; } break; } // string parent = 5; case 5: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_parent())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->parent().data(), static_cast<int>(this->parent().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.CreateClusterRequest.parent")); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.CreateClusterRequest) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.CreateClusterRequest) return false; #undef DO_ } void CreateClusterRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.CreateClusterRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string project_id = 1; if (this->project_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.CreateClusterRequest.project_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->project_id(), output); } // string zone = 2; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.CreateClusterRequest.zone"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->zone(), output); } // .google.container.v1beta1.Cluster cluster = 3; if (this->has_cluster()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 3, this->_internal_cluster(), output); } // string parent = 5; if (this->parent().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->parent().data(), static_cast<int>(this->parent().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.CreateClusterRequest.parent"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 5, this->parent(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.CreateClusterRequest) } ::google::protobuf::uint8* CreateClusterRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.CreateClusterRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string project_id = 1; if (this->project_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.CreateClusterRequest.project_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->project_id(), target); } // string zone = 2; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.CreateClusterRequest.zone"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->zone(), target); } // .google.container.v1beta1.Cluster cluster = 3; if (this->has_cluster()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 3, this->_internal_cluster(), deterministic, target); } // string parent = 5; if (this->parent().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->parent().data(), static_cast<int>(this->parent().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.CreateClusterRequest.parent"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 5, this->parent(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.CreateClusterRequest) return target; } size_t CreateClusterRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.CreateClusterRequest) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // string project_id = 1; if (this->project_id().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->project_id()); } // string zone = 2; if (this->zone().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->zone()); } // string parent = 5; if (this->parent().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->parent()); } // .google.container.v1beta1.Cluster cluster = 3; if (this->has_cluster()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *cluster_); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void CreateClusterRequest::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.CreateClusterRequest) GOOGLE_DCHECK_NE(&from, this); const CreateClusterRequest* source = ::google::protobuf::internal::DynamicCastToGenerated<const CreateClusterRequest>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.CreateClusterRequest) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.CreateClusterRequest) MergeFrom(*source); } } void CreateClusterRequest::MergeFrom(const CreateClusterRequest& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.CreateClusterRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.project_id().size() > 0) { project_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_id_); } if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } if (from.parent().size() > 0) { parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_); } if (from.has_cluster()) { mutable_cluster()->::google::container::v1beta1::Cluster::MergeFrom(from.cluster()); } } void CreateClusterRequest::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.CreateClusterRequest) if (&from == this) return; Clear(); MergeFrom(from); } void CreateClusterRequest::CopyFrom(const CreateClusterRequest& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.CreateClusterRequest) if (&from == this) return; Clear(); MergeFrom(from); } bool CreateClusterRequest::IsInitialized() const { return true; } void CreateClusterRequest::Swap(CreateClusterRequest* other) { if (other == this) return; InternalSwap(other); } void CreateClusterRequest::InternalSwap(CreateClusterRequest* other) { using std::swap; project_id_.Swap(&other->project_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); zone_.Swap(&other->zone_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); parent_.Swap(&other->parent_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(cluster_, other->cluster_); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata CreateClusterRequest::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void GetClusterRequest::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int GetClusterRequest::kProjectIdFieldNumber; const int GetClusterRequest::kZoneFieldNumber; const int GetClusterRequest::kClusterIdFieldNumber; const int GetClusterRequest::kNameFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 GetClusterRequest::GetClusterRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_GetClusterRequest.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.GetClusterRequest) } GetClusterRequest::GetClusterRequest(const GetClusterRequest& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); project_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.project_id().size() > 0) { project_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_id_); } zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } cluster_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.cluster_id().size() > 0) { cluster_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cluster_id_); } name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.name().size() > 0) { name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.GetClusterRequest) } void GetClusterRequest::SharedCtor() { project_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } GetClusterRequest::~GetClusterRequest() { // @@protoc_insertion_point(destructor:google.container.v1beta1.GetClusterRequest) SharedDtor(); } void GetClusterRequest::SharedDtor() { project_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } void GetClusterRequest::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* GetClusterRequest::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const GetClusterRequest& GetClusterRequest::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_GetClusterRequest.base); return *internal_default_instance(); } void GetClusterRequest::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.GetClusterRequest) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; project_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); _internal_metadata_.Clear(); } bool GetClusterRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.GetClusterRequest) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string project_id = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_project_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.GetClusterRequest.project_id")); } else { goto handle_unusual; } break; } // string zone = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_zone())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.GetClusterRequest.zone")); } else { goto handle_unusual; } break; } // string cluster_id = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_cluster_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.GetClusterRequest.cluster_id")); } else { goto handle_unusual; } break; } // string name = 5; case 5: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_name())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.GetClusterRequest.name")); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.GetClusterRequest) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.GetClusterRequest) return false; #undef DO_ } void GetClusterRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.GetClusterRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string project_id = 1; if (this->project_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.GetClusterRequest.project_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->project_id(), output); } // string zone = 2; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.GetClusterRequest.zone"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->zone(), output); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.GetClusterRequest.cluster_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 3, this->cluster_id(), output); } // string name = 5; if (this->name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.GetClusterRequest.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 5, this->name(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.GetClusterRequest) } ::google::protobuf::uint8* GetClusterRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.GetClusterRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string project_id = 1; if (this->project_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.GetClusterRequest.project_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->project_id(), target); } // string zone = 2; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.GetClusterRequest.zone"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->zone(), target); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.GetClusterRequest.cluster_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 3, this->cluster_id(), target); } // string name = 5; if (this->name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.GetClusterRequest.name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 5, this->name(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.GetClusterRequest) return target; } size_t GetClusterRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.GetClusterRequest) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // string project_id = 1; if (this->project_id().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->project_id()); } // string zone = 2; if (this->zone().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->zone()); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->cluster_id()); } // string name = 5; if (this->name().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->name()); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void GetClusterRequest::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.GetClusterRequest) GOOGLE_DCHECK_NE(&from, this); const GetClusterRequest* source = ::google::protobuf::internal::DynamicCastToGenerated<const GetClusterRequest>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.GetClusterRequest) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.GetClusterRequest) MergeFrom(*source); } } void GetClusterRequest::MergeFrom(const GetClusterRequest& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.GetClusterRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.project_id().size() > 0) { project_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_id_); } if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } if (from.cluster_id().size() > 0) { cluster_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cluster_id_); } if (from.name().size() > 0) { name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } } void GetClusterRequest::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.GetClusterRequest) if (&from == this) return; Clear(); MergeFrom(from); } void GetClusterRequest::CopyFrom(const GetClusterRequest& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.GetClusterRequest) if (&from == this) return; Clear(); MergeFrom(from); } bool GetClusterRequest::IsInitialized() const { return true; } void GetClusterRequest::Swap(GetClusterRequest* other) { if (other == this) return; InternalSwap(other); } void GetClusterRequest::InternalSwap(GetClusterRequest* other) { using std::swap; project_id_.Swap(&other->project_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); zone_.Swap(&other->zone_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); cluster_id_.Swap(&other->cluster_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata GetClusterRequest::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void UpdateClusterRequest::InitAsDefaultInstance() { ::google::container::v1beta1::_UpdateClusterRequest_default_instance_._instance.get_mutable()->update_ = const_cast< ::google::container::v1beta1::ClusterUpdate*>( ::google::container::v1beta1::ClusterUpdate::internal_default_instance()); } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int UpdateClusterRequest::kProjectIdFieldNumber; const int UpdateClusterRequest::kZoneFieldNumber; const int UpdateClusterRequest::kClusterIdFieldNumber; const int UpdateClusterRequest::kUpdateFieldNumber; const int UpdateClusterRequest::kNameFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 UpdateClusterRequest::UpdateClusterRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_UpdateClusterRequest.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.UpdateClusterRequest) } UpdateClusterRequest::UpdateClusterRequest(const UpdateClusterRequest& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); project_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.project_id().size() > 0) { project_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_id_); } zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } cluster_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.cluster_id().size() > 0) { cluster_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cluster_id_); } name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.name().size() > 0) { name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } if (from.has_update()) { update_ = new ::google::container::v1beta1::ClusterUpdate(*from.update_); } else { update_ = NULL; } // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.UpdateClusterRequest) } void UpdateClusterRequest::SharedCtor() { project_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); update_ = NULL; } UpdateClusterRequest::~UpdateClusterRequest() { // @@protoc_insertion_point(destructor:google.container.v1beta1.UpdateClusterRequest) SharedDtor(); } void UpdateClusterRequest::SharedDtor() { project_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete update_; } void UpdateClusterRequest::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* UpdateClusterRequest::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const UpdateClusterRequest& UpdateClusterRequest::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_UpdateClusterRequest.base); return *internal_default_instance(); } void UpdateClusterRequest::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.UpdateClusterRequest) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; project_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (GetArenaNoVirtual() == NULL && update_ != NULL) { delete update_; } update_ = NULL; _internal_metadata_.Clear(); } bool UpdateClusterRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.UpdateClusterRequest) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string project_id = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_project_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.UpdateClusterRequest.project_id")); } else { goto handle_unusual; } break; } // string zone = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_zone())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.UpdateClusterRequest.zone")); } else { goto handle_unusual; } break; } // string cluster_id = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_cluster_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.UpdateClusterRequest.cluster_id")); } else { goto handle_unusual; } break; } // .google.container.v1beta1.ClusterUpdate update = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, mutable_update())); } else { goto handle_unusual; } break; } // string name = 5; case 5: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_name())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.UpdateClusterRequest.name")); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.UpdateClusterRequest) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.UpdateClusterRequest) return false; #undef DO_ } void UpdateClusterRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.UpdateClusterRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string project_id = 1; if (this->project_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.UpdateClusterRequest.project_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->project_id(), output); } // string zone = 2; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.UpdateClusterRequest.zone"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->zone(), output); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.UpdateClusterRequest.cluster_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 3, this->cluster_id(), output); } // .google.container.v1beta1.ClusterUpdate update = 4; if (this->has_update()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 4, this->_internal_update(), output); } // string name = 5; if (this->name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.UpdateClusterRequest.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 5, this->name(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.UpdateClusterRequest) } ::google::protobuf::uint8* UpdateClusterRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.UpdateClusterRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string project_id = 1; if (this->project_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.UpdateClusterRequest.project_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->project_id(), target); } // string zone = 2; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.UpdateClusterRequest.zone"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->zone(), target); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.UpdateClusterRequest.cluster_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 3, this->cluster_id(), target); } // .google.container.v1beta1.ClusterUpdate update = 4; if (this->has_update()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 4, this->_internal_update(), deterministic, target); } // string name = 5; if (this->name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.UpdateClusterRequest.name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 5, this->name(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.UpdateClusterRequest) return target; } size_t UpdateClusterRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.UpdateClusterRequest) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // string project_id = 1; if (this->project_id().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->project_id()); } // string zone = 2; if (this->zone().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->zone()); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->cluster_id()); } // string name = 5; if (this->name().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->name()); } // .google.container.v1beta1.ClusterUpdate update = 4; if (this->has_update()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *update_); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void UpdateClusterRequest::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.UpdateClusterRequest) GOOGLE_DCHECK_NE(&from, this); const UpdateClusterRequest* source = ::google::protobuf::internal::DynamicCastToGenerated<const UpdateClusterRequest>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.UpdateClusterRequest) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.UpdateClusterRequest) MergeFrom(*source); } } void UpdateClusterRequest::MergeFrom(const UpdateClusterRequest& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.UpdateClusterRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.project_id().size() > 0) { project_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_id_); } if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } if (from.cluster_id().size() > 0) { cluster_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cluster_id_); } if (from.name().size() > 0) { name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } if (from.has_update()) { mutable_update()->::google::container::v1beta1::ClusterUpdate::MergeFrom(from.update()); } } void UpdateClusterRequest::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.UpdateClusterRequest) if (&from == this) return; Clear(); MergeFrom(from); } void UpdateClusterRequest::CopyFrom(const UpdateClusterRequest& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.UpdateClusterRequest) if (&from == this) return; Clear(); MergeFrom(from); } bool UpdateClusterRequest::IsInitialized() const { return true; } void UpdateClusterRequest::Swap(UpdateClusterRequest* other) { if (other == this) return; InternalSwap(other); } void UpdateClusterRequest::InternalSwap(UpdateClusterRequest* other) { using std::swap; project_id_.Swap(&other->project_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); zone_.Swap(&other->zone_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); cluster_id_.Swap(&other->cluster_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(update_, other->update_); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata UpdateClusterRequest::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void SetMasterAuthRequest::InitAsDefaultInstance() { ::google::container::v1beta1::_SetMasterAuthRequest_default_instance_._instance.get_mutable()->update_ = const_cast< ::google::container::v1beta1::MasterAuth*>( ::google::container::v1beta1::MasterAuth::internal_default_instance()); } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int SetMasterAuthRequest::kProjectIdFieldNumber; const int SetMasterAuthRequest::kZoneFieldNumber; const int SetMasterAuthRequest::kClusterIdFieldNumber; const int SetMasterAuthRequest::kActionFieldNumber; const int SetMasterAuthRequest::kUpdateFieldNumber; const int SetMasterAuthRequest::kNameFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 SetMasterAuthRequest::SetMasterAuthRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_SetMasterAuthRequest.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.SetMasterAuthRequest) } SetMasterAuthRequest::SetMasterAuthRequest(const SetMasterAuthRequest& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); project_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.project_id().size() > 0) { project_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_id_); } zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } cluster_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.cluster_id().size() > 0) { cluster_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cluster_id_); } name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.name().size() > 0) { name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } if (from.has_update()) { update_ = new ::google::container::v1beta1::MasterAuth(*from.update_); } else { update_ = NULL; } action_ = from.action_; // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.SetMasterAuthRequest) } void SetMasterAuthRequest::SharedCtor() { project_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); ::memset(&update_, 0, static_cast<size_t>( reinterpret_cast<char*>(&action_) - reinterpret_cast<char*>(&update_)) + sizeof(action_)); } SetMasterAuthRequest::~SetMasterAuthRequest() { // @@protoc_insertion_point(destructor:google.container.v1beta1.SetMasterAuthRequest) SharedDtor(); } void SetMasterAuthRequest::SharedDtor() { project_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete update_; } void SetMasterAuthRequest::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* SetMasterAuthRequest::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const SetMasterAuthRequest& SetMasterAuthRequest::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_SetMasterAuthRequest.base); return *internal_default_instance(); } void SetMasterAuthRequest::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.SetMasterAuthRequest) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; project_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (GetArenaNoVirtual() == NULL && update_ != NULL) { delete update_; } update_ = NULL; action_ = 0; _internal_metadata_.Clear(); } bool SetMasterAuthRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.SetMasterAuthRequest) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string project_id = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_project_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.SetMasterAuthRequest.project_id")); } else { goto handle_unusual; } break; } // string zone = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_zone())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.SetMasterAuthRequest.zone")); } else { goto handle_unusual; } break; } // string cluster_id = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_cluster_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.SetMasterAuthRequest.cluster_id")); } else { goto handle_unusual; } break; } // .google.container.v1beta1.SetMasterAuthRequest.Action action = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) { int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( input, &value))); set_action(static_cast< ::google::container::v1beta1::SetMasterAuthRequest_Action >(value)); } else { goto handle_unusual; } break; } // .google.container.v1beta1.MasterAuth update = 5; case 5: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, mutable_update())); } else { goto handle_unusual; } break; } // string name = 7; case 7: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_name())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.SetMasterAuthRequest.name")); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.SetMasterAuthRequest) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.SetMasterAuthRequest) return false; #undef DO_ } void SetMasterAuthRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.SetMasterAuthRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string project_id = 1; if (this->project_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetMasterAuthRequest.project_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->project_id(), output); } // string zone = 2; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetMasterAuthRequest.zone"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->zone(), output); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetMasterAuthRequest.cluster_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 3, this->cluster_id(), output); } // .google.container.v1beta1.SetMasterAuthRequest.Action action = 4; if (this->action() != 0) { ::google::protobuf::internal::WireFormatLite::WriteEnum( 4, this->action(), output); } // .google.container.v1beta1.MasterAuth update = 5; if (this->has_update()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 5, this->_internal_update(), output); } // string name = 7; if (this->name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetMasterAuthRequest.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 7, this->name(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.SetMasterAuthRequest) } ::google::protobuf::uint8* SetMasterAuthRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.SetMasterAuthRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string project_id = 1; if (this->project_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetMasterAuthRequest.project_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->project_id(), target); } // string zone = 2; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetMasterAuthRequest.zone"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->zone(), target); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetMasterAuthRequest.cluster_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 3, this->cluster_id(), target); } // .google.container.v1beta1.SetMasterAuthRequest.Action action = 4; if (this->action() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( 4, this->action(), target); } // .google.container.v1beta1.MasterAuth update = 5; if (this->has_update()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 5, this->_internal_update(), deterministic, target); } // string name = 7; if (this->name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetMasterAuthRequest.name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 7, this->name(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.SetMasterAuthRequest) return target; } size_t SetMasterAuthRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.SetMasterAuthRequest) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // string project_id = 1; if (this->project_id().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->project_id()); } // string zone = 2; if (this->zone().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->zone()); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->cluster_id()); } // string name = 7; if (this->name().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->name()); } // .google.container.v1beta1.MasterAuth update = 5; if (this->has_update()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *update_); } // .google.container.v1beta1.SetMasterAuthRequest.Action action = 4; if (this->action() != 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::EnumSize(this->action()); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void SetMasterAuthRequest::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.SetMasterAuthRequest) GOOGLE_DCHECK_NE(&from, this); const SetMasterAuthRequest* source = ::google::protobuf::internal::DynamicCastToGenerated<const SetMasterAuthRequest>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.SetMasterAuthRequest) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.SetMasterAuthRequest) MergeFrom(*source); } } void SetMasterAuthRequest::MergeFrom(const SetMasterAuthRequest& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.SetMasterAuthRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.project_id().size() > 0) { project_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_id_); } if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } if (from.cluster_id().size() > 0) { cluster_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cluster_id_); } if (from.name().size() > 0) { name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } if (from.has_update()) { mutable_update()->::google::container::v1beta1::MasterAuth::MergeFrom(from.update()); } if (from.action() != 0) { set_action(from.action()); } } void SetMasterAuthRequest::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.SetMasterAuthRequest) if (&from == this) return; Clear(); MergeFrom(from); } void SetMasterAuthRequest::CopyFrom(const SetMasterAuthRequest& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.SetMasterAuthRequest) if (&from == this) return; Clear(); MergeFrom(from); } bool SetMasterAuthRequest::IsInitialized() const { return true; } void SetMasterAuthRequest::Swap(SetMasterAuthRequest* other) { if (other == this) return; InternalSwap(other); } void SetMasterAuthRequest::InternalSwap(SetMasterAuthRequest* other) { using std::swap; project_id_.Swap(&other->project_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); zone_.Swap(&other->zone_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); cluster_id_.Swap(&other->cluster_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(update_, other->update_); swap(action_, other->action_); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata SetMasterAuthRequest::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void DeleteClusterRequest::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int DeleteClusterRequest::kProjectIdFieldNumber; const int DeleteClusterRequest::kZoneFieldNumber; const int DeleteClusterRequest::kClusterIdFieldNumber; const int DeleteClusterRequest::kNameFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 DeleteClusterRequest::DeleteClusterRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_DeleteClusterRequest.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.DeleteClusterRequest) } DeleteClusterRequest::DeleteClusterRequest(const DeleteClusterRequest& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); project_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.project_id().size() > 0) { project_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_id_); } zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } cluster_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.cluster_id().size() > 0) { cluster_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cluster_id_); } name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.name().size() > 0) { name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.DeleteClusterRequest) } void DeleteClusterRequest::SharedCtor() { project_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } DeleteClusterRequest::~DeleteClusterRequest() { // @@protoc_insertion_point(destructor:google.container.v1beta1.DeleteClusterRequest) SharedDtor(); } void DeleteClusterRequest::SharedDtor() { project_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } void DeleteClusterRequest::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* DeleteClusterRequest::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const DeleteClusterRequest& DeleteClusterRequest::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_DeleteClusterRequest.base); return *internal_default_instance(); } void DeleteClusterRequest::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.DeleteClusterRequest) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; project_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); _internal_metadata_.Clear(); } bool DeleteClusterRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.DeleteClusterRequest) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string project_id = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_project_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.DeleteClusterRequest.project_id")); } else { goto handle_unusual; } break; } // string zone = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_zone())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.DeleteClusterRequest.zone")); } else { goto handle_unusual; } break; } // string cluster_id = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_cluster_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.DeleteClusterRequest.cluster_id")); } else { goto handle_unusual; } break; } // string name = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_name())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.DeleteClusterRequest.name")); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.DeleteClusterRequest) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.DeleteClusterRequest) return false; #undef DO_ } void DeleteClusterRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.DeleteClusterRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string project_id = 1; if (this->project_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.DeleteClusterRequest.project_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->project_id(), output); } // string zone = 2; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.DeleteClusterRequest.zone"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->zone(), output); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.DeleteClusterRequest.cluster_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 3, this->cluster_id(), output); } // string name = 4; if (this->name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.DeleteClusterRequest.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 4, this->name(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.DeleteClusterRequest) } ::google::protobuf::uint8* DeleteClusterRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.DeleteClusterRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string project_id = 1; if (this->project_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.DeleteClusterRequest.project_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->project_id(), target); } // string zone = 2; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.DeleteClusterRequest.zone"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->zone(), target); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.DeleteClusterRequest.cluster_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 3, this->cluster_id(), target); } // string name = 4; if (this->name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.DeleteClusterRequest.name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 4, this->name(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.DeleteClusterRequest) return target; } size_t DeleteClusterRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.DeleteClusterRequest) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // string project_id = 1; if (this->project_id().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->project_id()); } // string zone = 2; if (this->zone().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->zone()); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->cluster_id()); } // string name = 4; if (this->name().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->name()); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void DeleteClusterRequest::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.DeleteClusterRequest) GOOGLE_DCHECK_NE(&from, this); const DeleteClusterRequest* source = ::google::protobuf::internal::DynamicCastToGenerated<const DeleteClusterRequest>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.DeleteClusterRequest) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.DeleteClusterRequest) MergeFrom(*source); } } void DeleteClusterRequest::MergeFrom(const DeleteClusterRequest& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.DeleteClusterRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.project_id().size() > 0) { project_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_id_); } if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } if (from.cluster_id().size() > 0) { cluster_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cluster_id_); } if (from.name().size() > 0) { name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } } void DeleteClusterRequest::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.DeleteClusterRequest) if (&from == this) return; Clear(); MergeFrom(from); } void DeleteClusterRequest::CopyFrom(const DeleteClusterRequest& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.DeleteClusterRequest) if (&from == this) return; Clear(); MergeFrom(from); } bool DeleteClusterRequest::IsInitialized() const { return true; } void DeleteClusterRequest::Swap(DeleteClusterRequest* other) { if (other == this) return; InternalSwap(other); } void DeleteClusterRequest::InternalSwap(DeleteClusterRequest* other) { using std::swap; project_id_.Swap(&other->project_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); zone_.Swap(&other->zone_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); cluster_id_.Swap(&other->cluster_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata DeleteClusterRequest::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void ListClustersRequest::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int ListClustersRequest::kProjectIdFieldNumber; const int ListClustersRequest::kZoneFieldNumber; const int ListClustersRequest::kParentFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 ListClustersRequest::ListClustersRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_ListClustersRequest.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.ListClustersRequest) } ListClustersRequest::ListClustersRequest(const ListClustersRequest& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); project_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.project_id().size() > 0) { project_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_id_); } zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.parent().size() > 0) { parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_); } // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.ListClustersRequest) } void ListClustersRequest::SharedCtor() { project_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } ListClustersRequest::~ListClustersRequest() { // @@protoc_insertion_point(destructor:google.container.v1beta1.ListClustersRequest) SharedDtor(); } void ListClustersRequest::SharedDtor() { project_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); parent_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } void ListClustersRequest::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* ListClustersRequest::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const ListClustersRequest& ListClustersRequest::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_ListClustersRequest.base); return *internal_default_instance(); } void ListClustersRequest::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.ListClustersRequest) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; project_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); parent_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); _internal_metadata_.Clear(); } bool ListClustersRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.ListClustersRequest) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string project_id = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_project_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.ListClustersRequest.project_id")); } else { goto handle_unusual; } break; } // string zone = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_zone())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.ListClustersRequest.zone")); } else { goto handle_unusual; } break; } // string parent = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_parent())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->parent().data(), static_cast<int>(this->parent().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.ListClustersRequest.parent")); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.ListClustersRequest) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.ListClustersRequest) return false; #undef DO_ } void ListClustersRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.ListClustersRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string project_id = 1; if (this->project_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.ListClustersRequest.project_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->project_id(), output); } // string zone = 2; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.ListClustersRequest.zone"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->zone(), output); } // string parent = 4; if (this->parent().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->parent().data(), static_cast<int>(this->parent().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.ListClustersRequest.parent"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 4, this->parent(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.ListClustersRequest) } ::google::protobuf::uint8* ListClustersRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.ListClustersRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string project_id = 1; if (this->project_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.ListClustersRequest.project_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->project_id(), target); } // string zone = 2; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.ListClustersRequest.zone"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->zone(), target); } // string parent = 4; if (this->parent().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->parent().data(), static_cast<int>(this->parent().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.ListClustersRequest.parent"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 4, this->parent(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.ListClustersRequest) return target; } size_t ListClustersRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.ListClustersRequest) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // string project_id = 1; if (this->project_id().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->project_id()); } // string zone = 2; if (this->zone().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->zone()); } // string parent = 4; if (this->parent().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->parent()); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void ListClustersRequest::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.ListClustersRequest) GOOGLE_DCHECK_NE(&from, this); const ListClustersRequest* source = ::google::protobuf::internal::DynamicCastToGenerated<const ListClustersRequest>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.ListClustersRequest) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.ListClustersRequest) MergeFrom(*source); } } void ListClustersRequest::MergeFrom(const ListClustersRequest& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.ListClustersRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.project_id().size() > 0) { project_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_id_); } if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } if (from.parent().size() > 0) { parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_); } } void ListClustersRequest::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.ListClustersRequest) if (&from == this) return; Clear(); MergeFrom(from); } void ListClustersRequest::CopyFrom(const ListClustersRequest& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.ListClustersRequest) if (&from == this) return; Clear(); MergeFrom(from); } bool ListClustersRequest::IsInitialized() const { return true; } void ListClustersRequest::Swap(ListClustersRequest* other) { if (other == this) return; InternalSwap(other); } void ListClustersRequest::InternalSwap(ListClustersRequest* other) { using std::swap; project_id_.Swap(&other->project_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); zone_.Swap(&other->zone_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); parent_.Swap(&other->parent_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata ListClustersRequest::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void ListClustersResponse::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int ListClustersResponse::kClustersFieldNumber; const int ListClustersResponse::kMissingZonesFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 ListClustersResponse::ListClustersResponse() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_ListClustersResponse.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.ListClustersResponse) } ListClustersResponse::ListClustersResponse(const ListClustersResponse& from) : ::google::protobuf::Message(), _internal_metadata_(NULL), clusters_(from.clusters_), missing_zones_(from.missing_zones_) { _internal_metadata_.MergeFrom(from._internal_metadata_); // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.ListClustersResponse) } void ListClustersResponse::SharedCtor() { } ListClustersResponse::~ListClustersResponse() { // @@protoc_insertion_point(destructor:google.container.v1beta1.ListClustersResponse) SharedDtor(); } void ListClustersResponse::SharedDtor() { } void ListClustersResponse::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* ListClustersResponse::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const ListClustersResponse& ListClustersResponse::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_ListClustersResponse.base); return *internal_default_instance(); } void ListClustersResponse::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.ListClustersResponse) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; clusters_.Clear(); missing_zones_.Clear(); _internal_metadata_.Clear(); } bool ListClustersResponse::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.ListClustersResponse) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // repeated .google.container.v1beta1.Cluster clusters = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, add_clusters())); } else { goto handle_unusual; } break; } // repeated string missing_zones = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->add_missing_zones())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->missing_zones(this->missing_zones_size() - 1).data(), static_cast<int>(this->missing_zones(this->missing_zones_size() - 1).length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.ListClustersResponse.missing_zones")); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.ListClustersResponse) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.ListClustersResponse) return false; #undef DO_ } void ListClustersResponse::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.ListClustersResponse) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated .google.container.v1beta1.Cluster clusters = 1; for (unsigned int i = 0, n = static_cast<unsigned int>(this->clusters_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 1, this->clusters(static_cast<int>(i)), output); } // repeated string missing_zones = 2; for (int i = 0, n = this->missing_zones_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->missing_zones(i).data(), static_cast<int>(this->missing_zones(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.ListClustersResponse.missing_zones"); ::google::protobuf::internal::WireFormatLite::WriteString( 2, this->missing_zones(i), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.ListClustersResponse) } ::google::protobuf::uint8* ListClustersResponse::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.ListClustersResponse) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated .google.container.v1beta1.Cluster clusters = 1; for (unsigned int i = 0, n = static_cast<unsigned int>(this->clusters_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 1, this->clusters(static_cast<int>(i)), deterministic, target); } // repeated string missing_zones = 2; for (int i = 0, n = this->missing_zones_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->missing_zones(i).data(), static_cast<int>(this->missing_zones(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.ListClustersResponse.missing_zones"); target = ::google::protobuf::internal::WireFormatLite:: WriteStringToArray(2, this->missing_zones(i), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.ListClustersResponse) return target; } size_t ListClustersResponse::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.ListClustersResponse) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // repeated .google.container.v1beta1.Cluster clusters = 1; { unsigned int count = static_cast<unsigned int>(this->clusters_size()); total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSize( this->clusters(static_cast<int>(i))); } } // repeated string missing_zones = 2; total_size += 1 * ::google::protobuf::internal::FromIntSize(this->missing_zones_size()); for (int i = 0, n = this->missing_zones_size(); i < n; i++) { total_size += ::google::protobuf::internal::WireFormatLite::StringSize( this->missing_zones(i)); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void ListClustersResponse::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.ListClustersResponse) GOOGLE_DCHECK_NE(&from, this); const ListClustersResponse* source = ::google::protobuf::internal::DynamicCastToGenerated<const ListClustersResponse>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.ListClustersResponse) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.ListClustersResponse) MergeFrom(*source); } } void ListClustersResponse::MergeFrom(const ListClustersResponse& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.ListClustersResponse) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; clusters_.MergeFrom(from.clusters_); missing_zones_.MergeFrom(from.missing_zones_); } void ListClustersResponse::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.ListClustersResponse) if (&from == this) return; Clear(); MergeFrom(from); } void ListClustersResponse::CopyFrom(const ListClustersResponse& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.ListClustersResponse) if (&from == this) return; Clear(); MergeFrom(from); } bool ListClustersResponse::IsInitialized() const { return true; } void ListClustersResponse::Swap(ListClustersResponse* other) { if (other == this) return; InternalSwap(other); } void ListClustersResponse::InternalSwap(ListClustersResponse* other) { using std::swap; CastToBase(&clusters_)->InternalSwap(CastToBase(&other->clusters_)); missing_zones_.InternalSwap(CastToBase(&other->missing_zones_)); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata ListClustersResponse::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void GetOperationRequest::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int GetOperationRequest::kProjectIdFieldNumber; const int GetOperationRequest::kZoneFieldNumber; const int GetOperationRequest::kOperationIdFieldNumber; const int GetOperationRequest::kNameFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 GetOperationRequest::GetOperationRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_GetOperationRequest.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.GetOperationRequest) } GetOperationRequest::GetOperationRequest(const GetOperationRequest& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); project_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.project_id().size() > 0) { project_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_id_); } zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } operation_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.operation_id().size() > 0) { operation_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.operation_id_); } name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.name().size() > 0) { name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.GetOperationRequest) } void GetOperationRequest::SharedCtor() { project_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); operation_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } GetOperationRequest::~GetOperationRequest() { // @@protoc_insertion_point(destructor:google.container.v1beta1.GetOperationRequest) SharedDtor(); } void GetOperationRequest::SharedDtor() { project_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); operation_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } void GetOperationRequest::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* GetOperationRequest::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const GetOperationRequest& GetOperationRequest::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_GetOperationRequest.base); return *internal_default_instance(); } void GetOperationRequest::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.GetOperationRequest) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; project_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); operation_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); _internal_metadata_.Clear(); } bool GetOperationRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.GetOperationRequest) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string project_id = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_project_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.GetOperationRequest.project_id")); } else { goto handle_unusual; } break; } // string zone = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_zone())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.GetOperationRequest.zone")); } else { goto handle_unusual; } break; } // string operation_id = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_operation_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->operation_id().data(), static_cast<int>(this->operation_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.GetOperationRequest.operation_id")); } else { goto handle_unusual; } break; } // string name = 5; case 5: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_name())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.GetOperationRequest.name")); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.GetOperationRequest) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.GetOperationRequest) return false; #undef DO_ } void GetOperationRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.GetOperationRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string project_id = 1; if (this->project_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.GetOperationRequest.project_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->project_id(), output); } // string zone = 2; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.GetOperationRequest.zone"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->zone(), output); } // string operation_id = 3; if (this->operation_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->operation_id().data(), static_cast<int>(this->operation_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.GetOperationRequest.operation_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 3, this->operation_id(), output); } // string name = 5; if (this->name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.GetOperationRequest.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 5, this->name(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.GetOperationRequest) } ::google::protobuf::uint8* GetOperationRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.GetOperationRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string project_id = 1; if (this->project_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.GetOperationRequest.project_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->project_id(), target); } // string zone = 2; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.GetOperationRequest.zone"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->zone(), target); } // string operation_id = 3; if (this->operation_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->operation_id().data(), static_cast<int>(this->operation_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.GetOperationRequest.operation_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 3, this->operation_id(), target); } // string name = 5; if (this->name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.GetOperationRequest.name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 5, this->name(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.GetOperationRequest) return target; } size_t GetOperationRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.GetOperationRequest) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // string project_id = 1; if (this->project_id().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->project_id()); } // string zone = 2; if (this->zone().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->zone()); } // string operation_id = 3; if (this->operation_id().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->operation_id()); } // string name = 5; if (this->name().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->name()); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void GetOperationRequest::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.GetOperationRequest) GOOGLE_DCHECK_NE(&from, this); const GetOperationRequest* source = ::google::protobuf::internal::DynamicCastToGenerated<const GetOperationRequest>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.GetOperationRequest) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.GetOperationRequest) MergeFrom(*source); } } void GetOperationRequest::MergeFrom(const GetOperationRequest& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.GetOperationRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.project_id().size() > 0) { project_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_id_); } if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } if (from.operation_id().size() > 0) { operation_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.operation_id_); } if (from.name().size() > 0) { name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } } void GetOperationRequest::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.GetOperationRequest) if (&from == this) return; Clear(); MergeFrom(from); } void GetOperationRequest::CopyFrom(const GetOperationRequest& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.GetOperationRequest) if (&from == this) return; Clear(); MergeFrom(from); } bool GetOperationRequest::IsInitialized() const { return true; } void GetOperationRequest::Swap(GetOperationRequest* other) { if (other == this) return; InternalSwap(other); } void GetOperationRequest::InternalSwap(GetOperationRequest* other) { using std::swap; project_id_.Swap(&other->project_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); zone_.Swap(&other->zone_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); operation_id_.Swap(&other->operation_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata GetOperationRequest::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void ListOperationsRequest::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int ListOperationsRequest::kProjectIdFieldNumber; const int ListOperationsRequest::kZoneFieldNumber; const int ListOperationsRequest::kParentFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 ListOperationsRequest::ListOperationsRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_ListOperationsRequest.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.ListOperationsRequest) } ListOperationsRequest::ListOperationsRequest(const ListOperationsRequest& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); project_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.project_id().size() > 0) { project_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_id_); } zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.parent().size() > 0) { parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_); } // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.ListOperationsRequest) } void ListOperationsRequest::SharedCtor() { project_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } ListOperationsRequest::~ListOperationsRequest() { // @@protoc_insertion_point(destructor:google.container.v1beta1.ListOperationsRequest) SharedDtor(); } void ListOperationsRequest::SharedDtor() { project_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); parent_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } void ListOperationsRequest::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* ListOperationsRequest::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const ListOperationsRequest& ListOperationsRequest::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_ListOperationsRequest.base); return *internal_default_instance(); } void ListOperationsRequest::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.ListOperationsRequest) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; project_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); parent_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); _internal_metadata_.Clear(); } bool ListOperationsRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.ListOperationsRequest) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string project_id = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_project_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.ListOperationsRequest.project_id")); } else { goto handle_unusual; } break; } // string zone = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_zone())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.ListOperationsRequest.zone")); } else { goto handle_unusual; } break; } // string parent = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_parent())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->parent().data(), static_cast<int>(this->parent().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.ListOperationsRequest.parent")); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.ListOperationsRequest) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.ListOperationsRequest) return false; #undef DO_ } void ListOperationsRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.ListOperationsRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string project_id = 1; if (this->project_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.ListOperationsRequest.project_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->project_id(), output); } // string zone = 2; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.ListOperationsRequest.zone"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->zone(), output); } // string parent = 4; if (this->parent().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->parent().data(), static_cast<int>(this->parent().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.ListOperationsRequest.parent"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 4, this->parent(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.ListOperationsRequest) } ::google::protobuf::uint8* ListOperationsRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.ListOperationsRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string project_id = 1; if (this->project_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.ListOperationsRequest.project_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->project_id(), target); } // string zone = 2; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.ListOperationsRequest.zone"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->zone(), target); } // string parent = 4; if (this->parent().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->parent().data(), static_cast<int>(this->parent().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.ListOperationsRequest.parent"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 4, this->parent(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.ListOperationsRequest) return target; } size_t ListOperationsRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.ListOperationsRequest) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // string project_id = 1; if (this->project_id().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->project_id()); } // string zone = 2; if (this->zone().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->zone()); } // string parent = 4; if (this->parent().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->parent()); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void ListOperationsRequest::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.ListOperationsRequest) GOOGLE_DCHECK_NE(&from, this); const ListOperationsRequest* source = ::google::protobuf::internal::DynamicCastToGenerated<const ListOperationsRequest>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.ListOperationsRequest) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.ListOperationsRequest) MergeFrom(*source); } } void ListOperationsRequest::MergeFrom(const ListOperationsRequest& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.ListOperationsRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.project_id().size() > 0) { project_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_id_); } if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } if (from.parent().size() > 0) { parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_); } } void ListOperationsRequest::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.ListOperationsRequest) if (&from == this) return; Clear(); MergeFrom(from); } void ListOperationsRequest::CopyFrom(const ListOperationsRequest& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.ListOperationsRequest) if (&from == this) return; Clear(); MergeFrom(from); } bool ListOperationsRequest::IsInitialized() const { return true; } void ListOperationsRequest::Swap(ListOperationsRequest* other) { if (other == this) return; InternalSwap(other); } void ListOperationsRequest::InternalSwap(ListOperationsRequest* other) { using std::swap; project_id_.Swap(&other->project_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); zone_.Swap(&other->zone_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); parent_.Swap(&other->parent_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata ListOperationsRequest::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void CancelOperationRequest::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int CancelOperationRequest::kProjectIdFieldNumber; const int CancelOperationRequest::kZoneFieldNumber; const int CancelOperationRequest::kOperationIdFieldNumber; const int CancelOperationRequest::kNameFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 CancelOperationRequest::CancelOperationRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_CancelOperationRequest.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.CancelOperationRequest) } CancelOperationRequest::CancelOperationRequest(const CancelOperationRequest& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); project_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.project_id().size() > 0) { project_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_id_); } zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } operation_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.operation_id().size() > 0) { operation_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.operation_id_); } name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.name().size() > 0) { name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.CancelOperationRequest) } void CancelOperationRequest::SharedCtor() { project_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); operation_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } CancelOperationRequest::~CancelOperationRequest() { // @@protoc_insertion_point(destructor:google.container.v1beta1.CancelOperationRequest) SharedDtor(); } void CancelOperationRequest::SharedDtor() { project_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); operation_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } void CancelOperationRequest::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* CancelOperationRequest::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const CancelOperationRequest& CancelOperationRequest::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_CancelOperationRequest.base); return *internal_default_instance(); } void CancelOperationRequest::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.CancelOperationRequest) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; project_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); operation_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); _internal_metadata_.Clear(); } bool CancelOperationRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.CancelOperationRequest) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string project_id = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_project_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.CancelOperationRequest.project_id")); } else { goto handle_unusual; } break; } // string zone = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_zone())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.CancelOperationRequest.zone")); } else { goto handle_unusual; } break; } // string operation_id = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_operation_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->operation_id().data(), static_cast<int>(this->operation_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.CancelOperationRequest.operation_id")); } else { goto handle_unusual; } break; } // string name = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_name())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.CancelOperationRequest.name")); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.CancelOperationRequest) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.CancelOperationRequest) return false; #undef DO_ } void CancelOperationRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.CancelOperationRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string project_id = 1; if (this->project_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.CancelOperationRequest.project_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->project_id(), output); } // string zone = 2; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.CancelOperationRequest.zone"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->zone(), output); } // string operation_id = 3; if (this->operation_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->operation_id().data(), static_cast<int>(this->operation_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.CancelOperationRequest.operation_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 3, this->operation_id(), output); } // string name = 4; if (this->name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.CancelOperationRequest.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 4, this->name(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.CancelOperationRequest) } ::google::protobuf::uint8* CancelOperationRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.CancelOperationRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string project_id = 1; if (this->project_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.CancelOperationRequest.project_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->project_id(), target); } // string zone = 2; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.CancelOperationRequest.zone"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->zone(), target); } // string operation_id = 3; if (this->operation_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->operation_id().data(), static_cast<int>(this->operation_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.CancelOperationRequest.operation_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 3, this->operation_id(), target); } // string name = 4; if (this->name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.CancelOperationRequest.name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 4, this->name(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.CancelOperationRequest) return target; } size_t CancelOperationRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.CancelOperationRequest) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // string project_id = 1; if (this->project_id().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->project_id()); } // string zone = 2; if (this->zone().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->zone()); } // string operation_id = 3; if (this->operation_id().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->operation_id()); } // string name = 4; if (this->name().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->name()); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void CancelOperationRequest::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.CancelOperationRequest) GOOGLE_DCHECK_NE(&from, this); const CancelOperationRequest* source = ::google::protobuf::internal::DynamicCastToGenerated<const CancelOperationRequest>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.CancelOperationRequest) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.CancelOperationRequest) MergeFrom(*source); } } void CancelOperationRequest::MergeFrom(const CancelOperationRequest& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.CancelOperationRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.project_id().size() > 0) { project_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_id_); } if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } if (from.operation_id().size() > 0) { operation_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.operation_id_); } if (from.name().size() > 0) { name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } } void CancelOperationRequest::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.CancelOperationRequest) if (&from == this) return; Clear(); MergeFrom(from); } void CancelOperationRequest::CopyFrom(const CancelOperationRequest& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.CancelOperationRequest) if (&from == this) return; Clear(); MergeFrom(from); } bool CancelOperationRequest::IsInitialized() const { return true; } void CancelOperationRequest::Swap(CancelOperationRequest* other) { if (other == this) return; InternalSwap(other); } void CancelOperationRequest::InternalSwap(CancelOperationRequest* other) { using std::swap; project_id_.Swap(&other->project_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); zone_.Swap(&other->zone_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); operation_id_.Swap(&other->operation_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata CancelOperationRequest::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void ListOperationsResponse::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int ListOperationsResponse::kOperationsFieldNumber; const int ListOperationsResponse::kMissingZonesFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 ListOperationsResponse::ListOperationsResponse() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_ListOperationsResponse.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.ListOperationsResponse) } ListOperationsResponse::ListOperationsResponse(const ListOperationsResponse& from) : ::google::protobuf::Message(), _internal_metadata_(NULL), operations_(from.operations_), missing_zones_(from.missing_zones_) { _internal_metadata_.MergeFrom(from._internal_metadata_); // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.ListOperationsResponse) } void ListOperationsResponse::SharedCtor() { } ListOperationsResponse::~ListOperationsResponse() { // @@protoc_insertion_point(destructor:google.container.v1beta1.ListOperationsResponse) SharedDtor(); } void ListOperationsResponse::SharedDtor() { } void ListOperationsResponse::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* ListOperationsResponse::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const ListOperationsResponse& ListOperationsResponse::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_ListOperationsResponse.base); return *internal_default_instance(); } void ListOperationsResponse::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.ListOperationsResponse) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; operations_.Clear(); missing_zones_.Clear(); _internal_metadata_.Clear(); } bool ListOperationsResponse::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.ListOperationsResponse) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // repeated .google.container.v1beta1.Operation operations = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, add_operations())); } else { goto handle_unusual; } break; } // repeated string missing_zones = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->add_missing_zones())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->missing_zones(this->missing_zones_size() - 1).data(), static_cast<int>(this->missing_zones(this->missing_zones_size() - 1).length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.ListOperationsResponse.missing_zones")); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.ListOperationsResponse) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.ListOperationsResponse) return false; #undef DO_ } void ListOperationsResponse::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.ListOperationsResponse) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated .google.container.v1beta1.Operation operations = 1; for (unsigned int i = 0, n = static_cast<unsigned int>(this->operations_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 1, this->operations(static_cast<int>(i)), output); } // repeated string missing_zones = 2; for (int i = 0, n = this->missing_zones_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->missing_zones(i).data(), static_cast<int>(this->missing_zones(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.ListOperationsResponse.missing_zones"); ::google::protobuf::internal::WireFormatLite::WriteString( 2, this->missing_zones(i), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.ListOperationsResponse) } ::google::protobuf::uint8* ListOperationsResponse::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.ListOperationsResponse) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated .google.container.v1beta1.Operation operations = 1; for (unsigned int i = 0, n = static_cast<unsigned int>(this->operations_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 1, this->operations(static_cast<int>(i)), deterministic, target); } // repeated string missing_zones = 2; for (int i = 0, n = this->missing_zones_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->missing_zones(i).data(), static_cast<int>(this->missing_zones(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.ListOperationsResponse.missing_zones"); target = ::google::protobuf::internal::WireFormatLite:: WriteStringToArray(2, this->missing_zones(i), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.ListOperationsResponse) return target; } size_t ListOperationsResponse::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.ListOperationsResponse) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // repeated .google.container.v1beta1.Operation operations = 1; { unsigned int count = static_cast<unsigned int>(this->operations_size()); total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSize( this->operations(static_cast<int>(i))); } } // repeated string missing_zones = 2; total_size += 1 * ::google::protobuf::internal::FromIntSize(this->missing_zones_size()); for (int i = 0, n = this->missing_zones_size(); i < n; i++) { total_size += ::google::protobuf::internal::WireFormatLite::StringSize( this->missing_zones(i)); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void ListOperationsResponse::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.ListOperationsResponse) GOOGLE_DCHECK_NE(&from, this); const ListOperationsResponse* source = ::google::protobuf::internal::DynamicCastToGenerated<const ListOperationsResponse>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.ListOperationsResponse) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.ListOperationsResponse) MergeFrom(*source); } } void ListOperationsResponse::MergeFrom(const ListOperationsResponse& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.ListOperationsResponse) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; operations_.MergeFrom(from.operations_); missing_zones_.MergeFrom(from.missing_zones_); } void ListOperationsResponse::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.ListOperationsResponse) if (&from == this) return; Clear(); MergeFrom(from); } void ListOperationsResponse::CopyFrom(const ListOperationsResponse& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.ListOperationsResponse) if (&from == this) return; Clear(); MergeFrom(from); } bool ListOperationsResponse::IsInitialized() const { return true; } void ListOperationsResponse::Swap(ListOperationsResponse* other) { if (other == this) return; InternalSwap(other); } void ListOperationsResponse::InternalSwap(ListOperationsResponse* other) { using std::swap; CastToBase(&operations_)->InternalSwap(CastToBase(&other->operations_)); missing_zones_.InternalSwap(CastToBase(&other->missing_zones_)); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata ListOperationsResponse::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void GetServerConfigRequest::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int GetServerConfigRequest::kProjectIdFieldNumber; const int GetServerConfigRequest::kZoneFieldNumber; const int GetServerConfigRequest::kNameFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 GetServerConfigRequest::GetServerConfigRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_GetServerConfigRequest.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.GetServerConfigRequest) } GetServerConfigRequest::GetServerConfigRequest(const GetServerConfigRequest& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); project_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.project_id().size() > 0) { project_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_id_); } zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.name().size() > 0) { name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.GetServerConfigRequest) } void GetServerConfigRequest::SharedCtor() { project_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } GetServerConfigRequest::~GetServerConfigRequest() { // @@protoc_insertion_point(destructor:google.container.v1beta1.GetServerConfigRequest) SharedDtor(); } void GetServerConfigRequest::SharedDtor() { project_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } void GetServerConfigRequest::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* GetServerConfigRequest::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const GetServerConfigRequest& GetServerConfigRequest::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_GetServerConfigRequest.base); return *internal_default_instance(); } void GetServerConfigRequest::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.GetServerConfigRequest) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; project_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); _internal_metadata_.Clear(); } bool GetServerConfigRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.GetServerConfigRequest) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string project_id = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_project_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.GetServerConfigRequest.project_id")); } else { goto handle_unusual; } break; } // string zone = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_zone())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.GetServerConfigRequest.zone")); } else { goto handle_unusual; } break; } // string name = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_name())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.GetServerConfigRequest.name")); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.GetServerConfigRequest) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.GetServerConfigRequest) return false; #undef DO_ } void GetServerConfigRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.GetServerConfigRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string project_id = 1; if (this->project_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.GetServerConfigRequest.project_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->project_id(), output); } // string zone = 2; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.GetServerConfigRequest.zone"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->zone(), output); } // string name = 4; if (this->name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.GetServerConfigRequest.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 4, this->name(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.GetServerConfigRequest) } ::google::protobuf::uint8* GetServerConfigRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.GetServerConfigRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string project_id = 1; if (this->project_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.GetServerConfigRequest.project_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->project_id(), target); } // string zone = 2; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.GetServerConfigRequest.zone"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->zone(), target); } // string name = 4; if (this->name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.GetServerConfigRequest.name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 4, this->name(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.GetServerConfigRequest) return target; } size_t GetServerConfigRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.GetServerConfigRequest) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // string project_id = 1; if (this->project_id().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->project_id()); } // string zone = 2; if (this->zone().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->zone()); } // string name = 4; if (this->name().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->name()); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void GetServerConfigRequest::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.GetServerConfigRequest) GOOGLE_DCHECK_NE(&from, this); const GetServerConfigRequest* source = ::google::protobuf::internal::DynamicCastToGenerated<const GetServerConfigRequest>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.GetServerConfigRequest) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.GetServerConfigRequest) MergeFrom(*source); } } void GetServerConfigRequest::MergeFrom(const GetServerConfigRequest& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.GetServerConfigRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.project_id().size() > 0) { project_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_id_); } if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } if (from.name().size() > 0) { name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } } void GetServerConfigRequest::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.GetServerConfigRequest) if (&from == this) return; Clear(); MergeFrom(from); } void GetServerConfigRequest::CopyFrom(const GetServerConfigRequest& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.GetServerConfigRequest) if (&from == this) return; Clear(); MergeFrom(from); } bool GetServerConfigRequest::IsInitialized() const { return true; } void GetServerConfigRequest::Swap(GetServerConfigRequest* other) { if (other == this) return; InternalSwap(other); } void GetServerConfigRequest::InternalSwap(GetServerConfigRequest* other) { using std::swap; project_id_.Swap(&other->project_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); zone_.Swap(&other->zone_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata GetServerConfigRequest::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void ServerConfig::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int ServerConfig::kDefaultClusterVersionFieldNumber; const int ServerConfig::kValidNodeVersionsFieldNumber; const int ServerConfig::kDefaultImageTypeFieldNumber; const int ServerConfig::kValidImageTypesFieldNumber; const int ServerConfig::kValidMasterVersionsFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 ServerConfig::ServerConfig() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_ServerConfig.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.ServerConfig) } ServerConfig::ServerConfig(const ServerConfig& from) : ::google::protobuf::Message(), _internal_metadata_(NULL), valid_node_versions_(from.valid_node_versions_), valid_image_types_(from.valid_image_types_), valid_master_versions_(from.valid_master_versions_) { _internal_metadata_.MergeFrom(from._internal_metadata_); default_cluster_version_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.default_cluster_version().size() > 0) { default_cluster_version_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.default_cluster_version_); } default_image_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.default_image_type().size() > 0) { default_image_type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.default_image_type_); } // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.ServerConfig) } void ServerConfig::SharedCtor() { default_cluster_version_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); default_image_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } ServerConfig::~ServerConfig() { // @@protoc_insertion_point(destructor:google.container.v1beta1.ServerConfig) SharedDtor(); } void ServerConfig::SharedDtor() { default_cluster_version_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); default_image_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } void ServerConfig::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* ServerConfig::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const ServerConfig& ServerConfig::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_ServerConfig.base); return *internal_default_instance(); } void ServerConfig::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.ServerConfig) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; valid_node_versions_.Clear(); valid_image_types_.Clear(); valid_master_versions_.Clear(); default_cluster_version_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); default_image_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); _internal_metadata_.Clear(); } bool ServerConfig::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.ServerConfig) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string default_cluster_version = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_default_cluster_version())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->default_cluster_version().data(), static_cast<int>(this->default_cluster_version().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.ServerConfig.default_cluster_version")); } else { goto handle_unusual; } break; } // repeated string valid_node_versions = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->add_valid_node_versions())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->valid_node_versions(this->valid_node_versions_size() - 1).data(), static_cast<int>(this->valid_node_versions(this->valid_node_versions_size() - 1).length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.ServerConfig.valid_node_versions")); } else { goto handle_unusual; } break; } // string default_image_type = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_default_image_type())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->default_image_type().data(), static_cast<int>(this->default_image_type().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.ServerConfig.default_image_type")); } else { goto handle_unusual; } break; } // repeated string valid_image_types = 5; case 5: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->add_valid_image_types())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->valid_image_types(this->valid_image_types_size() - 1).data(), static_cast<int>(this->valid_image_types(this->valid_image_types_size() - 1).length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.ServerConfig.valid_image_types")); } else { goto handle_unusual; } break; } // repeated string valid_master_versions = 6; case 6: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->add_valid_master_versions())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->valid_master_versions(this->valid_master_versions_size() - 1).data(), static_cast<int>(this->valid_master_versions(this->valid_master_versions_size() - 1).length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.ServerConfig.valid_master_versions")); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.ServerConfig) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.ServerConfig) return false; #undef DO_ } void ServerConfig::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.ServerConfig) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string default_cluster_version = 1; if (this->default_cluster_version().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->default_cluster_version().data(), static_cast<int>(this->default_cluster_version().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.ServerConfig.default_cluster_version"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->default_cluster_version(), output); } // repeated string valid_node_versions = 3; for (int i = 0, n = this->valid_node_versions_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->valid_node_versions(i).data(), static_cast<int>(this->valid_node_versions(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.ServerConfig.valid_node_versions"); ::google::protobuf::internal::WireFormatLite::WriteString( 3, this->valid_node_versions(i), output); } // string default_image_type = 4; if (this->default_image_type().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->default_image_type().data(), static_cast<int>(this->default_image_type().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.ServerConfig.default_image_type"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 4, this->default_image_type(), output); } // repeated string valid_image_types = 5; for (int i = 0, n = this->valid_image_types_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->valid_image_types(i).data(), static_cast<int>(this->valid_image_types(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.ServerConfig.valid_image_types"); ::google::protobuf::internal::WireFormatLite::WriteString( 5, this->valid_image_types(i), output); } // repeated string valid_master_versions = 6; for (int i = 0, n = this->valid_master_versions_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->valid_master_versions(i).data(), static_cast<int>(this->valid_master_versions(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.ServerConfig.valid_master_versions"); ::google::protobuf::internal::WireFormatLite::WriteString( 6, this->valid_master_versions(i), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.ServerConfig) } ::google::protobuf::uint8* ServerConfig::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.ServerConfig) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string default_cluster_version = 1; if (this->default_cluster_version().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->default_cluster_version().data(), static_cast<int>(this->default_cluster_version().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.ServerConfig.default_cluster_version"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->default_cluster_version(), target); } // repeated string valid_node_versions = 3; for (int i = 0, n = this->valid_node_versions_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->valid_node_versions(i).data(), static_cast<int>(this->valid_node_versions(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.ServerConfig.valid_node_versions"); target = ::google::protobuf::internal::WireFormatLite:: WriteStringToArray(3, this->valid_node_versions(i), target); } // string default_image_type = 4; if (this->default_image_type().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->default_image_type().data(), static_cast<int>(this->default_image_type().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.ServerConfig.default_image_type"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 4, this->default_image_type(), target); } // repeated string valid_image_types = 5; for (int i = 0, n = this->valid_image_types_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->valid_image_types(i).data(), static_cast<int>(this->valid_image_types(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.ServerConfig.valid_image_types"); target = ::google::protobuf::internal::WireFormatLite:: WriteStringToArray(5, this->valid_image_types(i), target); } // repeated string valid_master_versions = 6; for (int i = 0, n = this->valid_master_versions_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->valid_master_versions(i).data(), static_cast<int>(this->valid_master_versions(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.ServerConfig.valid_master_versions"); target = ::google::protobuf::internal::WireFormatLite:: WriteStringToArray(6, this->valid_master_versions(i), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.ServerConfig) return target; } size_t ServerConfig::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.ServerConfig) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // repeated string valid_node_versions = 3; total_size += 1 * ::google::protobuf::internal::FromIntSize(this->valid_node_versions_size()); for (int i = 0, n = this->valid_node_versions_size(); i < n; i++) { total_size += ::google::protobuf::internal::WireFormatLite::StringSize( this->valid_node_versions(i)); } // repeated string valid_image_types = 5; total_size += 1 * ::google::protobuf::internal::FromIntSize(this->valid_image_types_size()); for (int i = 0, n = this->valid_image_types_size(); i < n; i++) { total_size += ::google::protobuf::internal::WireFormatLite::StringSize( this->valid_image_types(i)); } // repeated string valid_master_versions = 6; total_size += 1 * ::google::protobuf::internal::FromIntSize(this->valid_master_versions_size()); for (int i = 0, n = this->valid_master_versions_size(); i < n; i++) { total_size += ::google::protobuf::internal::WireFormatLite::StringSize( this->valid_master_versions(i)); } // string default_cluster_version = 1; if (this->default_cluster_version().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->default_cluster_version()); } // string default_image_type = 4; if (this->default_image_type().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->default_image_type()); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void ServerConfig::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.ServerConfig) GOOGLE_DCHECK_NE(&from, this); const ServerConfig* source = ::google::protobuf::internal::DynamicCastToGenerated<const ServerConfig>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.ServerConfig) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.ServerConfig) MergeFrom(*source); } } void ServerConfig::MergeFrom(const ServerConfig& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.ServerConfig) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; valid_node_versions_.MergeFrom(from.valid_node_versions_); valid_image_types_.MergeFrom(from.valid_image_types_); valid_master_versions_.MergeFrom(from.valid_master_versions_); if (from.default_cluster_version().size() > 0) { default_cluster_version_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.default_cluster_version_); } if (from.default_image_type().size() > 0) { default_image_type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.default_image_type_); } } void ServerConfig::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.ServerConfig) if (&from == this) return; Clear(); MergeFrom(from); } void ServerConfig::CopyFrom(const ServerConfig& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.ServerConfig) if (&from == this) return; Clear(); MergeFrom(from); } bool ServerConfig::IsInitialized() const { return true; } void ServerConfig::Swap(ServerConfig* other) { if (other == this) return; InternalSwap(other); } void ServerConfig::InternalSwap(ServerConfig* other) { using std::swap; valid_node_versions_.InternalSwap(CastToBase(&other->valid_node_versions_)); valid_image_types_.InternalSwap(CastToBase(&other->valid_image_types_)); valid_master_versions_.InternalSwap(CastToBase(&other->valid_master_versions_)); default_cluster_version_.Swap(&other->default_cluster_version_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); default_image_type_.Swap(&other->default_image_type_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata ServerConfig::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void CreateNodePoolRequest::InitAsDefaultInstance() { ::google::container::v1beta1::_CreateNodePoolRequest_default_instance_._instance.get_mutable()->node_pool_ = const_cast< ::google::container::v1beta1::NodePool*>( ::google::container::v1beta1::NodePool::internal_default_instance()); } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int CreateNodePoolRequest::kProjectIdFieldNumber; const int CreateNodePoolRequest::kZoneFieldNumber; const int CreateNodePoolRequest::kClusterIdFieldNumber; const int CreateNodePoolRequest::kNodePoolFieldNumber; const int CreateNodePoolRequest::kParentFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 CreateNodePoolRequest::CreateNodePoolRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_CreateNodePoolRequest.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.CreateNodePoolRequest) } CreateNodePoolRequest::CreateNodePoolRequest(const CreateNodePoolRequest& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); project_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.project_id().size() > 0) { project_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_id_); } zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } cluster_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.cluster_id().size() > 0) { cluster_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cluster_id_); } parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.parent().size() > 0) { parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_); } if (from.has_node_pool()) { node_pool_ = new ::google::container::v1beta1::NodePool(*from.node_pool_); } else { node_pool_ = NULL; } // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.CreateNodePoolRequest) } void CreateNodePoolRequest::SharedCtor() { project_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); node_pool_ = NULL; } CreateNodePoolRequest::~CreateNodePoolRequest() { // @@protoc_insertion_point(destructor:google.container.v1beta1.CreateNodePoolRequest) SharedDtor(); } void CreateNodePoolRequest::SharedDtor() { project_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); parent_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete node_pool_; } void CreateNodePoolRequest::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* CreateNodePoolRequest::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const CreateNodePoolRequest& CreateNodePoolRequest::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_CreateNodePoolRequest.base); return *internal_default_instance(); } void CreateNodePoolRequest::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.CreateNodePoolRequest) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; project_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); parent_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (GetArenaNoVirtual() == NULL && node_pool_ != NULL) { delete node_pool_; } node_pool_ = NULL; _internal_metadata_.Clear(); } bool CreateNodePoolRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.CreateNodePoolRequest) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string project_id = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_project_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.CreateNodePoolRequest.project_id")); } else { goto handle_unusual; } break; } // string zone = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_zone())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.CreateNodePoolRequest.zone")); } else { goto handle_unusual; } break; } // string cluster_id = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_cluster_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.CreateNodePoolRequest.cluster_id")); } else { goto handle_unusual; } break; } // .google.container.v1beta1.NodePool node_pool = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, mutable_node_pool())); } else { goto handle_unusual; } break; } // string parent = 6; case 6: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_parent())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->parent().data(), static_cast<int>(this->parent().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.CreateNodePoolRequest.parent")); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.CreateNodePoolRequest) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.CreateNodePoolRequest) return false; #undef DO_ } void CreateNodePoolRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.CreateNodePoolRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string project_id = 1; if (this->project_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.CreateNodePoolRequest.project_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->project_id(), output); } // string zone = 2; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.CreateNodePoolRequest.zone"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->zone(), output); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.CreateNodePoolRequest.cluster_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 3, this->cluster_id(), output); } // .google.container.v1beta1.NodePool node_pool = 4; if (this->has_node_pool()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 4, this->_internal_node_pool(), output); } // string parent = 6; if (this->parent().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->parent().data(), static_cast<int>(this->parent().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.CreateNodePoolRequest.parent"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 6, this->parent(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.CreateNodePoolRequest) } ::google::protobuf::uint8* CreateNodePoolRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.CreateNodePoolRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string project_id = 1; if (this->project_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.CreateNodePoolRequest.project_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->project_id(), target); } // string zone = 2; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.CreateNodePoolRequest.zone"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->zone(), target); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.CreateNodePoolRequest.cluster_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 3, this->cluster_id(), target); } // .google.container.v1beta1.NodePool node_pool = 4; if (this->has_node_pool()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 4, this->_internal_node_pool(), deterministic, target); } // string parent = 6; if (this->parent().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->parent().data(), static_cast<int>(this->parent().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.CreateNodePoolRequest.parent"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 6, this->parent(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.CreateNodePoolRequest) return target; } size_t CreateNodePoolRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.CreateNodePoolRequest) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // string project_id = 1; if (this->project_id().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->project_id()); } // string zone = 2; if (this->zone().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->zone()); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->cluster_id()); } // string parent = 6; if (this->parent().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->parent()); } // .google.container.v1beta1.NodePool node_pool = 4; if (this->has_node_pool()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *node_pool_); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void CreateNodePoolRequest::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.CreateNodePoolRequest) GOOGLE_DCHECK_NE(&from, this); const CreateNodePoolRequest* source = ::google::protobuf::internal::DynamicCastToGenerated<const CreateNodePoolRequest>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.CreateNodePoolRequest) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.CreateNodePoolRequest) MergeFrom(*source); } } void CreateNodePoolRequest::MergeFrom(const CreateNodePoolRequest& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.CreateNodePoolRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.project_id().size() > 0) { project_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_id_); } if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } if (from.cluster_id().size() > 0) { cluster_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cluster_id_); } if (from.parent().size() > 0) { parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_); } if (from.has_node_pool()) { mutable_node_pool()->::google::container::v1beta1::NodePool::MergeFrom(from.node_pool()); } } void CreateNodePoolRequest::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.CreateNodePoolRequest) if (&from == this) return; Clear(); MergeFrom(from); } void CreateNodePoolRequest::CopyFrom(const CreateNodePoolRequest& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.CreateNodePoolRequest) if (&from == this) return; Clear(); MergeFrom(from); } bool CreateNodePoolRequest::IsInitialized() const { return true; } void CreateNodePoolRequest::Swap(CreateNodePoolRequest* other) { if (other == this) return; InternalSwap(other); } void CreateNodePoolRequest::InternalSwap(CreateNodePoolRequest* other) { using std::swap; project_id_.Swap(&other->project_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); zone_.Swap(&other->zone_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); cluster_id_.Swap(&other->cluster_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); parent_.Swap(&other->parent_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(node_pool_, other->node_pool_); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata CreateNodePoolRequest::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void DeleteNodePoolRequest::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int DeleteNodePoolRequest::kProjectIdFieldNumber; const int DeleteNodePoolRequest::kZoneFieldNumber; const int DeleteNodePoolRequest::kClusterIdFieldNumber; const int DeleteNodePoolRequest::kNodePoolIdFieldNumber; const int DeleteNodePoolRequest::kNameFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 DeleteNodePoolRequest::DeleteNodePoolRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_DeleteNodePoolRequest.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.DeleteNodePoolRequest) } DeleteNodePoolRequest::DeleteNodePoolRequest(const DeleteNodePoolRequest& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); project_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.project_id().size() > 0) { project_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_id_); } zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } cluster_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.cluster_id().size() > 0) { cluster_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cluster_id_); } node_pool_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.node_pool_id().size() > 0) { node_pool_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.node_pool_id_); } name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.name().size() > 0) { name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.DeleteNodePoolRequest) } void DeleteNodePoolRequest::SharedCtor() { project_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); node_pool_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } DeleteNodePoolRequest::~DeleteNodePoolRequest() { // @@protoc_insertion_point(destructor:google.container.v1beta1.DeleteNodePoolRequest) SharedDtor(); } void DeleteNodePoolRequest::SharedDtor() { project_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); node_pool_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } void DeleteNodePoolRequest::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* DeleteNodePoolRequest::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const DeleteNodePoolRequest& DeleteNodePoolRequest::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_DeleteNodePoolRequest.base); return *internal_default_instance(); } void DeleteNodePoolRequest::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.DeleteNodePoolRequest) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; project_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); node_pool_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); _internal_metadata_.Clear(); } bool DeleteNodePoolRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.DeleteNodePoolRequest) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string project_id = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_project_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.DeleteNodePoolRequest.project_id")); } else { goto handle_unusual; } break; } // string zone = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_zone())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.DeleteNodePoolRequest.zone")); } else { goto handle_unusual; } break; } // string cluster_id = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_cluster_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.DeleteNodePoolRequest.cluster_id")); } else { goto handle_unusual; } break; } // string node_pool_id = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_node_pool_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->node_pool_id().data(), static_cast<int>(this->node_pool_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.DeleteNodePoolRequest.node_pool_id")); } else { goto handle_unusual; } break; } // string name = 6; case 6: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_name())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.DeleteNodePoolRequest.name")); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.DeleteNodePoolRequest) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.DeleteNodePoolRequest) return false; #undef DO_ } void DeleteNodePoolRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.DeleteNodePoolRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string project_id = 1; if (this->project_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.DeleteNodePoolRequest.project_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->project_id(), output); } // string zone = 2; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.DeleteNodePoolRequest.zone"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->zone(), output); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.DeleteNodePoolRequest.cluster_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 3, this->cluster_id(), output); } // string node_pool_id = 4; if (this->node_pool_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->node_pool_id().data(), static_cast<int>(this->node_pool_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.DeleteNodePoolRequest.node_pool_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 4, this->node_pool_id(), output); } // string name = 6; if (this->name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.DeleteNodePoolRequest.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 6, this->name(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.DeleteNodePoolRequest) } ::google::protobuf::uint8* DeleteNodePoolRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.DeleteNodePoolRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string project_id = 1; if (this->project_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.DeleteNodePoolRequest.project_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->project_id(), target); } // string zone = 2; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.DeleteNodePoolRequest.zone"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->zone(), target); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.DeleteNodePoolRequest.cluster_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 3, this->cluster_id(), target); } // string node_pool_id = 4; if (this->node_pool_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->node_pool_id().data(), static_cast<int>(this->node_pool_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.DeleteNodePoolRequest.node_pool_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 4, this->node_pool_id(), target); } // string name = 6; if (this->name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.DeleteNodePoolRequest.name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 6, this->name(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.DeleteNodePoolRequest) return target; } size_t DeleteNodePoolRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.DeleteNodePoolRequest) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // string project_id = 1; if (this->project_id().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->project_id()); } // string zone = 2; if (this->zone().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->zone()); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->cluster_id()); } // string node_pool_id = 4; if (this->node_pool_id().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->node_pool_id()); } // string name = 6; if (this->name().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->name()); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void DeleteNodePoolRequest::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.DeleteNodePoolRequest) GOOGLE_DCHECK_NE(&from, this); const DeleteNodePoolRequest* source = ::google::protobuf::internal::DynamicCastToGenerated<const DeleteNodePoolRequest>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.DeleteNodePoolRequest) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.DeleteNodePoolRequest) MergeFrom(*source); } } void DeleteNodePoolRequest::MergeFrom(const DeleteNodePoolRequest& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.DeleteNodePoolRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.project_id().size() > 0) { project_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_id_); } if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } if (from.cluster_id().size() > 0) { cluster_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cluster_id_); } if (from.node_pool_id().size() > 0) { node_pool_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.node_pool_id_); } if (from.name().size() > 0) { name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } } void DeleteNodePoolRequest::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.DeleteNodePoolRequest) if (&from == this) return; Clear(); MergeFrom(from); } void DeleteNodePoolRequest::CopyFrom(const DeleteNodePoolRequest& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.DeleteNodePoolRequest) if (&from == this) return; Clear(); MergeFrom(from); } bool DeleteNodePoolRequest::IsInitialized() const { return true; } void DeleteNodePoolRequest::Swap(DeleteNodePoolRequest* other) { if (other == this) return; InternalSwap(other); } void DeleteNodePoolRequest::InternalSwap(DeleteNodePoolRequest* other) { using std::swap; project_id_.Swap(&other->project_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); zone_.Swap(&other->zone_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); cluster_id_.Swap(&other->cluster_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); node_pool_id_.Swap(&other->node_pool_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata DeleteNodePoolRequest::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void ListNodePoolsRequest::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int ListNodePoolsRequest::kProjectIdFieldNumber; const int ListNodePoolsRequest::kZoneFieldNumber; const int ListNodePoolsRequest::kClusterIdFieldNumber; const int ListNodePoolsRequest::kParentFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 ListNodePoolsRequest::ListNodePoolsRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_ListNodePoolsRequest.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.ListNodePoolsRequest) } ListNodePoolsRequest::ListNodePoolsRequest(const ListNodePoolsRequest& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); project_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.project_id().size() > 0) { project_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_id_); } zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } cluster_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.cluster_id().size() > 0) { cluster_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cluster_id_); } parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.parent().size() > 0) { parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_); } // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.ListNodePoolsRequest) } void ListNodePoolsRequest::SharedCtor() { project_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); parent_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } ListNodePoolsRequest::~ListNodePoolsRequest() { // @@protoc_insertion_point(destructor:google.container.v1beta1.ListNodePoolsRequest) SharedDtor(); } void ListNodePoolsRequest::SharedDtor() { project_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); parent_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } void ListNodePoolsRequest::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* ListNodePoolsRequest::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const ListNodePoolsRequest& ListNodePoolsRequest::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_ListNodePoolsRequest.base); return *internal_default_instance(); } void ListNodePoolsRequest::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.ListNodePoolsRequest) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; project_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); parent_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); _internal_metadata_.Clear(); } bool ListNodePoolsRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.ListNodePoolsRequest) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string project_id = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_project_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.ListNodePoolsRequest.project_id")); } else { goto handle_unusual; } break; } // string zone = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_zone())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.ListNodePoolsRequest.zone")); } else { goto handle_unusual; } break; } // string cluster_id = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_cluster_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.ListNodePoolsRequest.cluster_id")); } else { goto handle_unusual; } break; } // string parent = 5; case 5: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_parent())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->parent().data(), static_cast<int>(this->parent().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.ListNodePoolsRequest.parent")); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.ListNodePoolsRequest) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.ListNodePoolsRequest) return false; #undef DO_ } void ListNodePoolsRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.ListNodePoolsRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string project_id = 1; if (this->project_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.ListNodePoolsRequest.project_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->project_id(), output); } // string zone = 2; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.ListNodePoolsRequest.zone"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->zone(), output); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.ListNodePoolsRequest.cluster_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 3, this->cluster_id(), output); } // string parent = 5; if (this->parent().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->parent().data(), static_cast<int>(this->parent().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.ListNodePoolsRequest.parent"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 5, this->parent(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.ListNodePoolsRequest) } ::google::protobuf::uint8* ListNodePoolsRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.ListNodePoolsRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string project_id = 1; if (this->project_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.ListNodePoolsRequest.project_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->project_id(), target); } // string zone = 2; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.ListNodePoolsRequest.zone"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->zone(), target); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.ListNodePoolsRequest.cluster_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 3, this->cluster_id(), target); } // string parent = 5; if (this->parent().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->parent().data(), static_cast<int>(this->parent().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.ListNodePoolsRequest.parent"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 5, this->parent(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.ListNodePoolsRequest) return target; } size_t ListNodePoolsRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.ListNodePoolsRequest) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // string project_id = 1; if (this->project_id().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->project_id()); } // string zone = 2; if (this->zone().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->zone()); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->cluster_id()); } // string parent = 5; if (this->parent().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->parent()); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void ListNodePoolsRequest::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.ListNodePoolsRequest) GOOGLE_DCHECK_NE(&from, this); const ListNodePoolsRequest* source = ::google::protobuf::internal::DynamicCastToGenerated<const ListNodePoolsRequest>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.ListNodePoolsRequest) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.ListNodePoolsRequest) MergeFrom(*source); } } void ListNodePoolsRequest::MergeFrom(const ListNodePoolsRequest& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.ListNodePoolsRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.project_id().size() > 0) { project_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_id_); } if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } if (from.cluster_id().size() > 0) { cluster_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cluster_id_); } if (from.parent().size() > 0) { parent_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_); } } void ListNodePoolsRequest::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.ListNodePoolsRequest) if (&from == this) return; Clear(); MergeFrom(from); } void ListNodePoolsRequest::CopyFrom(const ListNodePoolsRequest& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.ListNodePoolsRequest) if (&from == this) return; Clear(); MergeFrom(from); } bool ListNodePoolsRequest::IsInitialized() const { return true; } void ListNodePoolsRequest::Swap(ListNodePoolsRequest* other) { if (other == this) return; InternalSwap(other); } void ListNodePoolsRequest::InternalSwap(ListNodePoolsRequest* other) { using std::swap; project_id_.Swap(&other->project_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); zone_.Swap(&other->zone_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); cluster_id_.Swap(&other->cluster_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); parent_.Swap(&other->parent_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata ListNodePoolsRequest::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void GetNodePoolRequest::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int GetNodePoolRequest::kProjectIdFieldNumber; const int GetNodePoolRequest::kZoneFieldNumber; const int GetNodePoolRequest::kClusterIdFieldNumber; const int GetNodePoolRequest::kNodePoolIdFieldNumber; const int GetNodePoolRequest::kNameFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 GetNodePoolRequest::GetNodePoolRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_GetNodePoolRequest.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.GetNodePoolRequest) } GetNodePoolRequest::GetNodePoolRequest(const GetNodePoolRequest& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); project_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.project_id().size() > 0) { project_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_id_); } zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } cluster_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.cluster_id().size() > 0) { cluster_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cluster_id_); } node_pool_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.node_pool_id().size() > 0) { node_pool_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.node_pool_id_); } name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.name().size() > 0) { name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.GetNodePoolRequest) } void GetNodePoolRequest::SharedCtor() { project_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); node_pool_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } GetNodePoolRequest::~GetNodePoolRequest() { // @@protoc_insertion_point(destructor:google.container.v1beta1.GetNodePoolRequest) SharedDtor(); } void GetNodePoolRequest::SharedDtor() { project_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); node_pool_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } void GetNodePoolRequest::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* GetNodePoolRequest::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const GetNodePoolRequest& GetNodePoolRequest::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_GetNodePoolRequest.base); return *internal_default_instance(); } void GetNodePoolRequest::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.GetNodePoolRequest) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; project_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); node_pool_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); _internal_metadata_.Clear(); } bool GetNodePoolRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.GetNodePoolRequest) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string project_id = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_project_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.GetNodePoolRequest.project_id")); } else { goto handle_unusual; } break; } // string zone = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_zone())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.GetNodePoolRequest.zone")); } else { goto handle_unusual; } break; } // string cluster_id = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_cluster_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.GetNodePoolRequest.cluster_id")); } else { goto handle_unusual; } break; } // string node_pool_id = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_node_pool_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->node_pool_id().data(), static_cast<int>(this->node_pool_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.GetNodePoolRequest.node_pool_id")); } else { goto handle_unusual; } break; } // string name = 6; case 6: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_name())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.GetNodePoolRequest.name")); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.GetNodePoolRequest) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.GetNodePoolRequest) return false; #undef DO_ } void GetNodePoolRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.GetNodePoolRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string project_id = 1; if (this->project_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.GetNodePoolRequest.project_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->project_id(), output); } // string zone = 2; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.GetNodePoolRequest.zone"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->zone(), output); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.GetNodePoolRequest.cluster_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 3, this->cluster_id(), output); } // string node_pool_id = 4; if (this->node_pool_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->node_pool_id().data(), static_cast<int>(this->node_pool_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.GetNodePoolRequest.node_pool_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 4, this->node_pool_id(), output); } // string name = 6; if (this->name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.GetNodePoolRequest.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 6, this->name(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.GetNodePoolRequest) } ::google::protobuf::uint8* GetNodePoolRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.GetNodePoolRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string project_id = 1; if (this->project_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.GetNodePoolRequest.project_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->project_id(), target); } // string zone = 2; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.GetNodePoolRequest.zone"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->zone(), target); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.GetNodePoolRequest.cluster_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 3, this->cluster_id(), target); } // string node_pool_id = 4; if (this->node_pool_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->node_pool_id().data(), static_cast<int>(this->node_pool_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.GetNodePoolRequest.node_pool_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 4, this->node_pool_id(), target); } // string name = 6; if (this->name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.GetNodePoolRequest.name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 6, this->name(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.GetNodePoolRequest) return target; } size_t GetNodePoolRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.GetNodePoolRequest) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // string project_id = 1; if (this->project_id().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->project_id()); } // string zone = 2; if (this->zone().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->zone()); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->cluster_id()); } // string node_pool_id = 4; if (this->node_pool_id().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->node_pool_id()); } // string name = 6; if (this->name().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->name()); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void GetNodePoolRequest::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.GetNodePoolRequest) GOOGLE_DCHECK_NE(&from, this); const GetNodePoolRequest* source = ::google::protobuf::internal::DynamicCastToGenerated<const GetNodePoolRequest>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.GetNodePoolRequest) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.GetNodePoolRequest) MergeFrom(*source); } } void GetNodePoolRequest::MergeFrom(const GetNodePoolRequest& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.GetNodePoolRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.project_id().size() > 0) { project_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_id_); } if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } if (from.cluster_id().size() > 0) { cluster_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cluster_id_); } if (from.node_pool_id().size() > 0) { node_pool_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.node_pool_id_); } if (from.name().size() > 0) { name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } } void GetNodePoolRequest::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.GetNodePoolRequest) if (&from == this) return; Clear(); MergeFrom(from); } void GetNodePoolRequest::CopyFrom(const GetNodePoolRequest& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.GetNodePoolRequest) if (&from == this) return; Clear(); MergeFrom(from); } bool GetNodePoolRequest::IsInitialized() const { return true; } void GetNodePoolRequest::Swap(GetNodePoolRequest* other) { if (other == this) return; InternalSwap(other); } void GetNodePoolRequest::InternalSwap(GetNodePoolRequest* other) { using std::swap; project_id_.Swap(&other->project_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); zone_.Swap(&other->zone_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); cluster_id_.Swap(&other->cluster_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); node_pool_id_.Swap(&other->node_pool_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata GetNodePoolRequest::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void NodePool::InitAsDefaultInstance() { ::google::container::v1beta1::_NodePool_default_instance_._instance.get_mutable()->config_ = const_cast< ::google::container::v1beta1::NodeConfig*>( ::google::container::v1beta1::NodeConfig::internal_default_instance()); ::google::container::v1beta1::_NodePool_default_instance_._instance.get_mutable()->autoscaling_ = const_cast< ::google::container::v1beta1::NodePoolAutoscaling*>( ::google::container::v1beta1::NodePoolAutoscaling::internal_default_instance()); ::google::container::v1beta1::_NodePool_default_instance_._instance.get_mutable()->management_ = const_cast< ::google::container::v1beta1::NodeManagement*>( ::google::container::v1beta1::NodeManagement::internal_default_instance()); } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int NodePool::kNameFieldNumber; const int NodePool::kConfigFieldNumber; const int NodePool::kInitialNodeCountFieldNumber; const int NodePool::kSelfLinkFieldNumber; const int NodePool::kVersionFieldNumber; const int NodePool::kInstanceGroupUrlsFieldNumber; const int NodePool::kStatusFieldNumber; const int NodePool::kStatusMessageFieldNumber; const int NodePool::kAutoscalingFieldNumber; const int NodePool::kManagementFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 NodePool::NodePool() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_NodePool.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.NodePool) } NodePool::NodePool(const NodePool& from) : ::google::protobuf::Message(), _internal_metadata_(NULL), instance_group_urls_(from.instance_group_urls_) { _internal_metadata_.MergeFrom(from._internal_metadata_); name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.name().size() > 0) { name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } self_link_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.self_link().size() > 0) { self_link_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.self_link_); } version_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.version().size() > 0) { version_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.version_); } status_message_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.status_message().size() > 0) { status_message_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.status_message_); } if (from.has_config()) { config_ = new ::google::container::v1beta1::NodeConfig(*from.config_); } else { config_ = NULL; } if (from.has_autoscaling()) { autoscaling_ = new ::google::container::v1beta1::NodePoolAutoscaling(*from.autoscaling_); } else { autoscaling_ = NULL; } if (from.has_management()) { management_ = new ::google::container::v1beta1::NodeManagement(*from.management_); } else { management_ = NULL; } ::memcpy(&initial_node_count_, &from.initial_node_count_, static_cast<size_t>(reinterpret_cast<char*>(&status_) - reinterpret_cast<char*>(&initial_node_count_)) + sizeof(status_)); // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.NodePool) } void NodePool::SharedCtor() { name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); self_link_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); version_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); status_message_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); ::memset(&config_, 0, static_cast<size_t>( reinterpret_cast<char*>(&status_) - reinterpret_cast<char*>(&config_)) + sizeof(status_)); } NodePool::~NodePool() { // @@protoc_insertion_point(destructor:google.container.v1beta1.NodePool) SharedDtor(); } void NodePool::SharedDtor() { name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); self_link_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); version_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); status_message_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete config_; if (this != internal_default_instance()) delete autoscaling_; if (this != internal_default_instance()) delete management_; } void NodePool::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* NodePool::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const NodePool& NodePool::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_NodePool.base); return *internal_default_instance(); } void NodePool::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.NodePool) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; instance_group_urls_.Clear(); name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); self_link_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); version_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); status_message_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (GetArenaNoVirtual() == NULL && config_ != NULL) { delete config_; } config_ = NULL; if (GetArenaNoVirtual() == NULL && autoscaling_ != NULL) { delete autoscaling_; } autoscaling_ = NULL; if (GetArenaNoVirtual() == NULL && management_ != NULL) { delete management_; } management_ = NULL; ::memset(&initial_node_count_, 0, static_cast<size_t>( reinterpret_cast<char*>(&status_) - reinterpret_cast<char*>(&initial_node_count_)) + sizeof(status_)); _internal_metadata_.Clear(); } bool NodePool::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.NodePool) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string name = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_name())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.NodePool.name")); } else { goto handle_unusual; } break; } // .google.container.v1beta1.NodeConfig config = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, mutable_config())); } else { goto handle_unusual; } break; } // int32 initial_node_count = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &initial_node_count_))); } else { goto handle_unusual; } break; } // .google.container.v1beta1.NodePoolAutoscaling autoscaling = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, mutable_autoscaling())); } else { goto handle_unusual; } break; } // .google.container.v1beta1.NodeManagement management = 5; case 5: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, mutable_management())); } else { goto handle_unusual; } break; } // string self_link = 100; case 100: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(34u /* 802 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_self_link())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->self_link().data(), static_cast<int>(this->self_link().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.NodePool.self_link")); } else { goto handle_unusual; } break; } // string version = 101; case 101: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(42u /* 810 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_version())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->version().data(), static_cast<int>(this->version().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.NodePool.version")); } else { goto handle_unusual; } break; } // repeated string instance_group_urls = 102; case 102: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(50u /* 818 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->add_instance_group_urls())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->instance_group_urls(this->instance_group_urls_size() - 1).data(), static_cast<int>(this->instance_group_urls(this->instance_group_urls_size() - 1).length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.NodePool.instance_group_urls")); } else { goto handle_unusual; } break; } // .google.container.v1beta1.NodePool.Status status = 103; case 103: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(56u /* 824 & 0xFF */)) { int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( input, &value))); set_status(static_cast< ::google::container::v1beta1::NodePool_Status >(value)); } else { goto handle_unusual; } break; } // string status_message = 104; case 104: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(66u /* 834 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_status_message())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->status_message().data(), static_cast<int>(this->status_message().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.NodePool.status_message")); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.NodePool) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.NodePool) return false; #undef DO_ } void NodePool::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.NodePool) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string name = 1; if (this->name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.NodePool.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->name(), output); } // .google.container.v1beta1.NodeConfig config = 2; if (this->has_config()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 2, this->_internal_config(), output); } // int32 initial_node_count = 3; if (this->initial_node_count() != 0) { ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->initial_node_count(), output); } // .google.container.v1beta1.NodePoolAutoscaling autoscaling = 4; if (this->has_autoscaling()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 4, this->_internal_autoscaling(), output); } // .google.container.v1beta1.NodeManagement management = 5; if (this->has_management()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 5, this->_internal_management(), output); } // string self_link = 100; if (this->self_link().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->self_link().data(), static_cast<int>(this->self_link().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.NodePool.self_link"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 100, this->self_link(), output); } // string version = 101; if (this->version().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->version().data(), static_cast<int>(this->version().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.NodePool.version"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 101, this->version(), output); } // repeated string instance_group_urls = 102; for (int i = 0, n = this->instance_group_urls_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->instance_group_urls(i).data(), static_cast<int>(this->instance_group_urls(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.NodePool.instance_group_urls"); ::google::protobuf::internal::WireFormatLite::WriteString( 102, this->instance_group_urls(i), output); } // .google.container.v1beta1.NodePool.Status status = 103; if (this->status() != 0) { ::google::protobuf::internal::WireFormatLite::WriteEnum( 103, this->status(), output); } // string status_message = 104; if (this->status_message().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->status_message().data(), static_cast<int>(this->status_message().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.NodePool.status_message"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 104, this->status_message(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.NodePool) } ::google::protobuf::uint8* NodePool::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.NodePool) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string name = 1; if (this->name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.NodePool.name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->name(), target); } // .google.container.v1beta1.NodeConfig config = 2; if (this->has_config()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 2, this->_internal_config(), deterministic, target); } // int32 initial_node_count = 3; if (this->initial_node_count() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->initial_node_count(), target); } // .google.container.v1beta1.NodePoolAutoscaling autoscaling = 4; if (this->has_autoscaling()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 4, this->_internal_autoscaling(), deterministic, target); } // .google.container.v1beta1.NodeManagement management = 5; if (this->has_management()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 5, this->_internal_management(), deterministic, target); } // string self_link = 100; if (this->self_link().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->self_link().data(), static_cast<int>(this->self_link().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.NodePool.self_link"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 100, this->self_link(), target); } // string version = 101; if (this->version().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->version().data(), static_cast<int>(this->version().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.NodePool.version"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 101, this->version(), target); } // repeated string instance_group_urls = 102; for (int i = 0, n = this->instance_group_urls_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->instance_group_urls(i).data(), static_cast<int>(this->instance_group_urls(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.NodePool.instance_group_urls"); target = ::google::protobuf::internal::WireFormatLite:: WriteStringToArray(102, this->instance_group_urls(i), target); } // .google.container.v1beta1.NodePool.Status status = 103; if (this->status() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( 103, this->status(), target); } // string status_message = 104; if (this->status_message().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->status_message().data(), static_cast<int>(this->status_message().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.NodePool.status_message"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 104, this->status_message(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.NodePool) return target; } size_t NodePool::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.NodePool) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // repeated string instance_group_urls = 102; total_size += 2 * ::google::protobuf::internal::FromIntSize(this->instance_group_urls_size()); for (int i = 0, n = this->instance_group_urls_size(); i < n; i++) { total_size += ::google::protobuf::internal::WireFormatLite::StringSize( this->instance_group_urls(i)); } // string name = 1; if (this->name().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->name()); } // string self_link = 100; if (this->self_link().size() > 0) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( this->self_link()); } // string version = 101; if (this->version().size() > 0) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( this->version()); } // string status_message = 104; if (this->status_message().size() > 0) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( this->status_message()); } // .google.container.v1beta1.NodeConfig config = 2; if (this->has_config()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *config_); } // .google.container.v1beta1.NodePoolAutoscaling autoscaling = 4; if (this->has_autoscaling()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *autoscaling_); } // .google.container.v1beta1.NodeManagement management = 5; if (this->has_management()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *management_); } // int32 initial_node_count = 3; if (this->initial_node_count() != 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( this->initial_node_count()); } // .google.container.v1beta1.NodePool.Status status = 103; if (this->status() != 0) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::EnumSize(this->status()); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void NodePool::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.NodePool) GOOGLE_DCHECK_NE(&from, this); const NodePool* source = ::google::protobuf::internal::DynamicCastToGenerated<const NodePool>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.NodePool) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.NodePool) MergeFrom(*source); } } void NodePool::MergeFrom(const NodePool& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.NodePool) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; instance_group_urls_.MergeFrom(from.instance_group_urls_); if (from.name().size() > 0) { name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } if (from.self_link().size() > 0) { self_link_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.self_link_); } if (from.version().size() > 0) { version_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.version_); } if (from.status_message().size() > 0) { status_message_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.status_message_); } if (from.has_config()) { mutable_config()->::google::container::v1beta1::NodeConfig::MergeFrom(from.config()); } if (from.has_autoscaling()) { mutable_autoscaling()->::google::container::v1beta1::NodePoolAutoscaling::MergeFrom(from.autoscaling()); } if (from.has_management()) { mutable_management()->::google::container::v1beta1::NodeManagement::MergeFrom(from.management()); } if (from.initial_node_count() != 0) { set_initial_node_count(from.initial_node_count()); } if (from.status() != 0) { set_status(from.status()); } } void NodePool::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.NodePool) if (&from == this) return; Clear(); MergeFrom(from); } void NodePool::CopyFrom(const NodePool& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.NodePool) if (&from == this) return; Clear(); MergeFrom(from); } bool NodePool::IsInitialized() const { return true; } void NodePool::Swap(NodePool* other) { if (other == this) return; InternalSwap(other); } void NodePool::InternalSwap(NodePool* other) { using std::swap; instance_group_urls_.InternalSwap(CastToBase(&other->instance_group_urls_)); name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); self_link_.Swap(&other->self_link_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); version_.Swap(&other->version_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); status_message_.Swap(&other->status_message_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(config_, other->config_); swap(autoscaling_, other->autoscaling_); swap(management_, other->management_); swap(initial_node_count_, other->initial_node_count_); swap(status_, other->status_); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata NodePool::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void NodeManagement::InitAsDefaultInstance() { ::google::container::v1beta1::_NodeManagement_default_instance_._instance.get_mutable()->upgrade_options_ = const_cast< ::google::container::v1beta1::AutoUpgradeOptions*>( ::google::container::v1beta1::AutoUpgradeOptions::internal_default_instance()); } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int NodeManagement::kAutoUpgradeFieldNumber; const int NodeManagement::kAutoRepairFieldNumber; const int NodeManagement::kUpgradeOptionsFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 NodeManagement::NodeManagement() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_NodeManagement.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.NodeManagement) } NodeManagement::NodeManagement(const NodeManagement& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); if (from.has_upgrade_options()) { upgrade_options_ = new ::google::container::v1beta1::AutoUpgradeOptions(*from.upgrade_options_); } else { upgrade_options_ = NULL; } ::memcpy(&auto_upgrade_, &from.auto_upgrade_, static_cast<size_t>(reinterpret_cast<char*>(&auto_repair_) - reinterpret_cast<char*>(&auto_upgrade_)) + sizeof(auto_repair_)); // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.NodeManagement) } void NodeManagement::SharedCtor() { ::memset(&upgrade_options_, 0, static_cast<size_t>( reinterpret_cast<char*>(&auto_repair_) - reinterpret_cast<char*>(&upgrade_options_)) + sizeof(auto_repair_)); } NodeManagement::~NodeManagement() { // @@protoc_insertion_point(destructor:google.container.v1beta1.NodeManagement) SharedDtor(); } void NodeManagement::SharedDtor() { if (this != internal_default_instance()) delete upgrade_options_; } void NodeManagement::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* NodeManagement::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const NodeManagement& NodeManagement::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_NodeManagement.base); return *internal_default_instance(); } void NodeManagement::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.NodeManagement) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; if (GetArenaNoVirtual() == NULL && upgrade_options_ != NULL) { delete upgrade_options_; } upgrade_options_ = NULL; ::memset(&auto_upgrade_, 0, static_cast<size_t>( reinterpret_cast<char*>(&auto_repair_) - reinterpret_cast<char*>(&auto_upgrade_)) + sizeof(auto_repair_)); _internal_metadata_.Clear(); } bool NodeManagement::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.NodeManagement) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // bool auto_upgrade = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( input, &auto_upgrade_))); } else { goto handle_unusual; } break; } // bool auto_repair = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( input, &auto_repair_))); } else { goto handle_unusual; } break; } // .google.container.v1beta1.AutoUpgradeOptions upgrade_options = 10; case 10: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(82u /* 82 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, mutable_upgrade_options())); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.NodeManagement) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.NodeManagement) return false; #undef DO_ } void NodeManagement::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.NodeManagement) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // bool auto_upgrade = 1; if (this->auto_upgrade() != 0) { ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->auto_upgrade(), output); } // bool auto_repair = 2; if (this->auto_repair() != 0) { ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->auto_repair(), output); } // .google.container.v1beta1.AutoUpgradeOptions upgrade_options = 10; if (this->has_upgrade_options()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 10, this->_internal_upgrade_options(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.NodeManagement) } ::google::protobuf::uint8* NodeManagement::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.NodeManagement) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // bool auto_upgrade = 1; if (this->auto_upgrade() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->auto_upgrade(), target); } // bool auto_repair = 2; if (this->auto_repair() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->auto_repair(), target); } // .google.container.v1beta1.AutoUpgradeOptions upgrade_options = 10; if (this->has_upgrade_options()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 10, this->_internal_upgrade_options(), deterministic, target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.NodeManagement) return target; } size_t NodeManagement::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.NodeManagement) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // .google.container.v1beta1.AutoUpgradeOptions upgrade_options = 10; if (this->has_upgrade_options()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *upgrade_options_); } // bool auto_upgrade = 1; if (this->auto_upgrade() != 0) { total_size += 1 + 1; } // bool auto_repair = 2; if (this->auto_repair() != 0) { total_size += 1 + 1; } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void NodeManagement::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.NodeManagement) GOOGLE_DCHECK_NE(&from, this); const NodeManagement* source = ::google::protobuf::internal::DynamicCastToGenerated<const NodeManagement>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.NodeManagement) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.NodeManagement) MergeFrom(*source); } } void NodeManagement::MergeFrom(const NodeManagement& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.NodeManagement) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.has_upgrade_options()) { mutable_upgrade_options()->::google::container::v1beta1::AutoUpgradeOptions::MergeFrom(from.upgrade_options()); } if (from.auto_upgrade() != 0) { set_auto_upgrade(from.auto_upgrade()); } if (from.auto_repair() != 0) { set_auto_repair(from.auto_repair()); } } void NodeManagement::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.NodeManagement) if (&from == this) return; Clear(); MergeFrom(from); } void NodeManagement::CopyFrom(const NodeManagement& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.NodeManagement) if (&from == this) return; Clear(); MergeFrom(from); } bool NodeManagement::IsInitialized() const { return true; } void NodeManagement::Swap(NodeManagement* other) { if (other == this) return; InternalSwap(other); } void NodeManagement::InternalSwap(NodeManagement* other) { using std::swap; swap(upgrade_options_, other->upgrade_options_); swap(auto_upgrade_, other->auto_upgrade_); swap(auto_repair_, other->auto_repair_); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata NodeManagement::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void AutoUpgradeOptions::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int AutoUpgradeOptions::kAutoUpgradeStartTimeFieldNumber; const int AutoUpgradeOptions::kDescriptionFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 AutoUpgradeOptions::AutoUpgradeOptions() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_AutoUpgradeOptions.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.AutoUpgradeOptions) } AutoUpgradeOptions::AutoUpgradeOptions(const AutoUpgradeOptions& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); auto_upgrade_start_time_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.auto_upgrade_start_time().size() > 0) { auto_upgrade_start_time_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.auto_upgrade_start_time_); } description_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.description().size() > 0) { description_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.description_); } // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.AutoUpgradeOptions) } void AutoUpgradeOptions::SharedCtor() { auto_upgrade_start_time_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); description_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } AutoUpgradeOptions::~AutoUpgradeOptions() { // @@protoc_insertion_point(destructor:google.container.v1beta1.AutoUpgradeOptions) SharedDtor(); } void AutoUpgradeOptions::SharedDtor() { auto_upgrade_start_time_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); description_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } void AutoUpgradeOptions::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* AutoUpgradeOptions::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const AutoUpgradeOptions& AutoUpgradeOptions::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_AutoUpgradeOptions.base); return *internal_default_instance(); } void AutoUpgradeOptions::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.AutoUpgradeOptions) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; auto_upgrade_start_time_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); description_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); _internal_metadata_.Clear(); } bool AutoUpgradeOptions::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.AutoUpgradeOptions) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string auto_upgrade_start_time = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_auto_upgrade_start_time())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->auto_upgrade_start_time().data(), static_cast<int>(this->auto_upgrade_start_time().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.AutoUpgradeOptions.auto_upgrade_start_time")); } else { goto handle_unusual; } break; } // string description = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_description())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->description().data(), static_cast<int>(this->description().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.AutoUpgradeOptions.description")); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.AutoUpgradeOptions) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.AutoUpgradeOptions) return false; #undef DO_ } void AutoUpgradeOptions::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.AutoUpgradeOptions) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string auto_upgrade_start_time = 1; if (this->auto_upgrade_start_time().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->auto_upgrade_start_time().data(), static_cast<int>(this->auto_upgrade_start_time().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.AutoUpgradeOptions.auto_upgrade_start_time"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->auto_upgrade_start_time(), output); } // string description = 2; if (this->description().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->description().data(), static_cast<int>(this->description().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.AutoUpgradeOptions.description"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->description(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.AutoUpgradeOptions) } ::google::protobuf::uint8* AutoUpgradeOptions::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.AutoUpgradeOptions) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string auto_upgrade_start_time = 1; if (this->auto_upgrade_start_time().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->auto_upgrade_start_time().data(), static_cast<int>(this->auto_upgrade_start_time().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.AutoUpgradeOptions.auto_upgrade_start_time"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->auto_upgrade_start_time(), target); } // string description = 2; if (this->description().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->description().data(), static_cast<int>(this->description().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.AutoUpgradeOptions.description"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->description(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.AutoUpgradeOptions) return target; } size_t AutoUpgradeOptions::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.AutoUpgradeOptions) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // string auto_upgrade_start_time = 1; if (this->auto_upgrade_start_time().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->auto_upgrade_start_time()); } // string description = 2; if (this->description().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->description()); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void AutoUpgradeOptions::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.AutoUpgradeOptions) GOOGLE_DCHECK_NE(&from, this); const AutoUpgradeOptions* source = ::google::protobuf::internal::DynamicCastToGenerated<const AutoUpgradeOptions>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.AutoUpgradeOptions) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.AutoUpgradeOptions) MergeFrom(*source); } } void AutoUpgradeOptions::MergeFrom(const AutoUpgradeOptions& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.AutoUpgradeOptions) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.auto_upgrade_start_time().size() > 0) { auto_upgrade_start_time_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.auto_upgrade_start_time_); } if (from.description().size() > 0) { description_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.description_); } } void AutoUpgradeOptions::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.AutoUpgradeOptions) if (&from == this) return; Clear(); MergeFrom(from); } void AutoUpgradeOptions::CopyFrom(const AutoUpgradeOptions& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.AutoUpgradeOptions) if (&from == this) return; Clear(); MergeFrom(from); } bool AutoUpgradeOptions::IsInitialized() const { return true; } void AutoUpgradeOptions::Swap(AutoUpgradeOptions* other) { if (other == this) return; InternalSwap(other); } void AutoUpgradeOptions::InternalSwap(AutoUpgradeOptions* other) { using std::swap; auto_upgrade_start_time_.Swap(&other->auto_upgrade_start_time_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); description_.Swap(&other->description_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata AutoUpgradeOptions::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void MaintenancePolicy::InitAsDefaultInstance() { ::google::container::v1beta1::_MaintenancePolicy_default_instance_._instance.get_mutable()->window_ = const_cast< ::google::container::v1beta1::MaintenanceWindow*>( ::google::container::v1beta1::MaintenanceWindow::internal_default_instance()); } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int MaintenancePolicy::kWindowFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 MaintenancePolicy::MaintenancePolicy() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_MaintenancePolicy.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.MaintenancePolicy) } MaintenancePolicy::MaintenancePolicy(const MaintenancePolicy& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); if (from.has_window()) { window_ = new ::google::container::v1beta1::MaintenanceWindow(*from.window_); } else { window_ = NULL; } // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.MaintenancePolicy) } void MaintenancePolicy::SharedCtor() { window_ = NULL; } MaintenancePolicy::~MaintenancePolicy() { // @@protoc_insertion_point(destructor:google.container.v1beta1.MaintenancePolicy) SharedDtor(); } void MaintenancePolicy::SharedDtor() { if (this != internal_default_instance()) delete window_; } void MaintenancePolicy::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* MaintenancePolicy::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const MaintenancePolicy& MaintenancePolicy::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_MaintenancePolicy.base); return *internal_default_instance(); } void MaintenancePolicy::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.MaintenancePolicy) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; if (GetArenaNoVirtual() == NULL && window_ != NULL) { delete window_; } window_ = NULL; _internal_metadata_.Clear(); } bool MaintenancePolicy::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.MaintenancePolicy) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // .google.container.v1beta1.MaintenanceWindow window = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, mutable_window())); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.MaintenancePolicy) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.MaintenancePolicy) return false; #undef DO_ } void MaintenancePolicy::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.MaintenancePolicy) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // .google.container.v1beta1.MaintenanceWindow window = 1; if (this->has_window()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 1, this->_internal_window(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.MaintenancePolicy) } ::google::protobuf::uint8* MaintenancePolicy::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.MaintenancePolicy) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // .google.container.v1beta1.MaintenanceWindow window = 1; if (this->has_window()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 1, this->_internal_window(), deterministic, target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.MaintenancePolicy) return target; } size_t MaintenancePolicy::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.MaintenancePolicy) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // .google.container.v1beta1.MaintenanceWindow window = 1; if (this->has_window()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *window_); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void MaintenancePolicy::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.MaintenancePolicy) GOOGLE_DCHECK_NE(&from, this); const MaintenancePolicy* source = ::google::protobuf::internal::DynamicCastToGenerated<const MaintenancePolicy>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.MaintenancePolicy) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.MaintenancePolicy) MergeFrom(*source); } } void MaintenancePolicy::MergeFrom(const MaintenancePolicy& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.MaintenancePolicy) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.has_window()) { mutable_window()->::google::container::v1beta1::MaintenanceWindow::MergeFrom(from.window()); } } void MaintenancePolicy::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.MaintenancePolicy) if (&from == this) return; Clear(); MergeFrom(from); } void MaintenancePolicy::CopyFrom(const MaintenancePolicy& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.MaintenancePolicy) if (&from == this) return; Clear(); MergeFrom(from); } bool MaintenancePolicy::IsInitialized() const { return true; } void MaintenancePolicy::Swap(MaintenancePolicy* other) { if (other == this) return; InternalSwap(other); } void MaintenancePolicy::InternalSwap(MaintenancePolicy* other) { using std::swap; swap(window_, other->window_); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata MaintenancePolicy::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void MaintenanceWindow::InitAsDefaultInstance() { ::google::container::v1beta1::_MaintenanceWindow_default_instance_.daily_maintenance_window_ = const_cast< ::google::container::v1beta1::DailyMaintenanceWindow*>( ::google::container::v1beta1::DailyMaintenanceWindow::internal_default_instance()); } void MaintenanceWindow::set_allocated_daily_maintenance_window(::google::container::v1beta1::DailyMaintenanceWindow* daily_maintenance_window) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); clear_policy(); if (daily_maintenance_window) { ::google::protobuf::Arena* submessage_arena = NULL; if (message_arena != submessage_arena) { daily_maintenance_window = ::google::protobuf::internal::GetOwnedMessage( message_arena, daily_maintenance_window, submessage_arena); } set_has_daily_maintenance_window(); policy_.daily_maintenance_window_ = daily_maintenance_window; } // @@protoc_insertion_point(field_set_allocated:google.container.v1beta1.MaintenanceWindow.daily_maintenance_window) } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int MaintenanceWindow::kDailyMaintenanceWindowFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 MaintenanceWindow::MaintenanceWindow() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_MaintenanceWindow.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.MaintenanceWindow) } MaintenanceWindow::MaintenanceWindow(const MaintenanceWindow& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); clear_has_policy(); switch (from.policy_case()) { case kDailyMaintenanceWindow: { mutable_daily_maintenance_window()->::google::container::v1beta1::DailyMaintenanceWindow::MergeFrom(from.daily_maintenance_window()); break; } case POLICY_NOT_SET: { break; } } // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.MaintenanceWindow) } void MaintenanceWindow::SharedCtor() { clear_has_policy(); } MaintenanceWindow::~MaintenanceWindow() { // @@protoc_insertion_point(destructor:google.container.v1beta1.MaintenanceWindow) SharedDtor(); } void MaintenanceWindow::SharedDtor() { if (has_policy()) { clear_policy(); } } void MaintenanceWindow::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* MaintenanceWindow::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const MaintenanceWindow& MaintenanceWindow::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_MaintenanceWindow.base); return *internal_default_instance(); } void MaintenanceWindow::clear_policy() { // @@protoc_insertion_point(one_of_clear_start:google.container.v1beta1.MaintenanceWindow) switch (policy_case()) { case kDailyMaintenanceWindow: { delete policy_.daily_maintenance_window_; break; } case POLICY_NOT_SET: { break; } } _oneof_case_[0] = POLICY_NOT_SET; } void MaintenanceWindow::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.MaintenanceWindow) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; clear_policy(); _internal_metadata_.Clear(); } bool MaintenanceWindow::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.MaintenanceWindow) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // .google.container.v1beta1.DailyMaintenanceWindow daily_maintenance_window = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, mutable_daily_maintenance_window())); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.MaintenanceWindow) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.MaintenanceWindow) return false; #undef DO_ } void MaintenanceWindow::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.MaintenanceWindow) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // .google.container.v1beta1.DailyMaintenanceWindow daily_maintenance_window = 2; if (has_daily_maintenance_window()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 2, this->_internal_daily_maintenance_window(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.MaintenanceWindow) } ::google::protobuf::uint8* MaintenanceWindow::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.MaintenanceWindow) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // .google.container.v1beta1.DailyMaintenanceWindow daily_maintenance_window = 2; if (has_daily_maintenance_window()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 2, this->_internal_daily_maintenance_window(), deterministic, target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.MaintenanceWindow) return target; } size_t MaintenanceWindow::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.MaintenanceWindow) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } switch (policy_case()) { // .google.container.v1beta1.DailyMaintenanceWindow daily_maintenance_window = 2; case kDailyMaintenanceWindow: { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *policy_.daily_maintenance_window_); break; } case POLICY_NOT_SET: { break; } } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void MaintenanceWindow::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.MaintenanceWindow) GOOGLE_DCHECK_NE(&from, this); const MaintenanceWindow* source = ::google::protobuf::internal::DynamicCastToGenerated<const MaintenanceWindow>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.MaintenanceWindow) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.MaintenanceWindow) MergeFrom(*source); } } void MaintenanceWindow::MergeFrom(const MaintenanceWindow& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.MaintenanceWindow) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; switch (from.policy_case()) { case kDailyMaintenanceWindow: { mutable_daily_maintenance_window()->::google::container::v1beta1::DailyMaintenanceWindow::MergeFrom(from.daily_maintenance_window()); break; } case POLICY_NOT_SET: { break; } } } void MaintenanceWindow::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.MaintenanceWindow) if (&from == this) return; Clear(); MergeFrom(from); } void MaintenanceWindow::CopyFrom(const MaintenanceWindow& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.MaintenanceWindow) if (&from == this) return; Clear(); MergeFrom(from); } bool MaintenanceWindow::IsInitialized() const { return true; } void MaintenanceWindow::Swap(MaintenanceWindow* other) { if (other == this) return; InternalSwap(other); } void MaintenanceWindow::InternalSwap(MaintenanceWindow* other) { using std::swap; swap(policy_, other->policy_); swap(_oneof_case_[0], other->_oneof_case_[0]); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata MaintenanceWindow::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void DailyMaintenanceWindow::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int DailyMaintenanceWindow::kStartTimeFieldNumber; const int DailyMaintenanceWindow::kDurationFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 DailyMaintenanceWindow::DailyMaintenanceWindow() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_DailyMaintenanceWindow.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.DailyMaintenanceWindow) } DailyMaintenanceWindow::DailyMaintenanceWindow(const DailyMaintenanceWindow& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); start_time_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.start_time().size() > 0) { start_time_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.start_time_); } duration_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.duration().size() > 0) { duration_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.duration_); } // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.DailyMaintenanceWindow) } void DailyMaintenanceWindow::SharedCtor() { start_time_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); duration_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } DailyMaintenanceWindow::~DailyMaintenanceWindow() { // @@protoc_insertion_point(destructor:google.container.v1beta1.DailyMaintenanceWindow) SharedDtor(); } void DailyMaintenanceWindow::SharedDtor() { start_time_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); duration_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } void DailyMaintenanceWindow::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* DailyMaintenanceWindow::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const DailyMaintenanceWindow& DailyMaintenanceWindow::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_DailyMaintenanceWindow.base); return *internal_default_instance(); } void DailyMaintenanceWindow::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.DailyMaintenanceWindow) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; start_time_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); duration_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); _internal_metadata_.Clear(); } bool DailyMaintenanceWindow::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.DailyMaintenanceWindow) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string start_time = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_start_time())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->start_time().data(), static_cast<int>(this->start_time().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.DailyMaintenanceWindow.start_time")); } else { goto handle_unusual; } break; } // string duration = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_duration())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->duration().data(), static_cast<int>(this->duration().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.DailyMaintenanceWindow.duration")); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.DailyMaintenanceWindow) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.DailyMaintenanceWindow) return false; #undef DO_ } void DailyMaintenanceWindow::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.DailyMaintenanceWindow) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string start_time = 2; if (this->start_time().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->start_time().data(), static_cast<int>(this->start_time().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.DailyMaintenanceWindow.start_time"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->start_time(), output); } // string duration = 3; if (this->duration().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->duration().data(), static_cast<int>(this->duration().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.DailyMaintenanceWindow.duration"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 3, this->duration(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.DailyMaintenanceWindow) } ::google::protobuf::uint8* DailyMaintenanceWindow::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.DailyMaintenanceWindow) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string start_time = 2; if (this->start_time().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->start_time().data(), static_cast<int>(this->start_time().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.DailyMaintenanceWindow.start_time"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->start_time(), target); } // string duration = 3; if (this->duration().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->duration().data(), static_cast<int>(this->duration().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.DailyMaintenanceWindow.duration"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 3, this->duration(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.DailyMaintenanceWindow) return target; } size_t DailyMaintenanceWindow::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.DailyMaintenanceWindow) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // string start_time = 2; if (this->start_time().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->start_time()); } // string duration = 3; if (this->duration().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->duration()); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void DailyMaintenanceWindow::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.DailyMaintenanceWindow) GOOGLE_DCHECK_NE(&from, this); const DailyMaintenanceWindow* source = ::google::protobuf::internal::DynamicCastToGenerated<const DailyMaintenanceWindow>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.DailyMaintenanceWindow) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.DailyMaintenanceWindow) MergeFrom(*source); } } void DailyMaintenanceWindow::MergeFrom(const DailyMaintenanceWindow& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.DailyMaintenanceWindow) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.start_time().size() > 0) { start_time_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.start_time_); } if (from.duration().size() > 0) { duration_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.duration_); } } void DailyMaintenanceWindow::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.DailyMaintenanceWindow) if (&from == this) return; Clear(); MergeFrom(from); } void DailyMaintenanceWindow::CopyFrom(const DailyMaintenanceWindow& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.DailyMaintenanceWindow) if (&from == this) return; Clear(); MergeFrom(from); } bool DailyMaintenanceWindow::IsInitialized() const { return true; } void DailyMaintenanceWindow::Swap(DailyMaintenanceWindow* other) { if (other == this) return; InternalSwap(other); } void DailyMaintenanceWindow::InternalSwap(DailyMaintenanceWindow* other) { using std::swap; start_time_.Swap(&other->start_time_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); duration_.Swap(&other->duration_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata DailyMaintenanceWindow::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void SetNodePoolManagementRequest::InitAsDefaultInstance() { ::google::container::v1beta1::_SetNodePoolManagementRequest_default_instance_._instance.get_mutable()->management_ = const_cast< ::google::container::v1beta1::NodeManagement*>( ::google::container::v1beta1::NodeManagement::internal_default_instance()); } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int SetNodePoolManagementRequest::kProjectIdFieldNumber; const int SetNodePoolManagementRequest::kZoneFieldNumber; const int SetNodePoolManagementRequest::kClusterIdFieldNumber; const int SetNodePoolManagementRequest::kNodePoolIdFieldNumber; const int SetNodePoolManagementRequest::kManagementFieldNumber; const int SetNodePoolManagementRequest::kNameFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 SetNodePoolManagementRequest::SetNodePoolManagementRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_SetNodePoolManagementRequest.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.SetNodePoolManagementRequest) } SetNodePoolManagementRequest::SetNodePoolManagementRequest(const SetNodePoolManagementRequest& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); project_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.project_id().size() > 0) { project_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_id_); } zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } cluster_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.cluster_id().size() > 0) { cluster_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cluster_id_); } node_pool_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.node_pool_id().size() > 0) { node_pool_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.node_pool_id_); } name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.name().size() > 0) { name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } if (from.has_management()) { management_ = new ::google::container::v1beta1::NodeManagement(*from.management_); } else { management_ = NULL; } // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.SetNodePoolManagementRequest) } void SetNodePoolManagementRequest::SharedCtor() { project_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); node_pool_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); management_ = NULL; } SetNodePoolManagementRequest::~SetNodePoolManagementRequest() { // @@protoc_insertion_point(destructor:google.container.v1beta1.SetNodePoolManagementRequest) SharedDtor(); } void SetNodePoolManagementRequest::SharedDtor() { project_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); node_pool_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete management_; } void SetNodePoolManagementRequest::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* SetNodePoolManagementRequest::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const SetNodePoolManagementRequest& SetNodePoolManagementRequest::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_SetNodePoolManagementRequest.base); return *internal_default_instance(); } void SetNodePoolManagementRequest::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.SetNodePoolManagementRequest) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; project_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); node_pool_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (GetArenaNoVirtual() == NULL && management_ != NULL) { delete management_; } management_ = NULL; _internal_metadata_.Clear(); } bool SetNodePoolManagementRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.SetNodePoolManagementRequest) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string project_id = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_project_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.SetNodePoolManagementRequest.project_id")); } else { goto handle_unusual; } break; } // string zone = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_zone())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.SetNodePoolManagementRequest.zone")); } else { goto handle_unusual; } break; } // string cluster_id = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_cluster_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.SetNodePoolManagementRequest.cluster_id")); } else { goto handle_unusual; } break; } // string node_pool_id = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_node_pool_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->node_pool_id().data(), static_cast<int>(this->node_pool_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.SetNodePoolManagementRequest.node_pool_id")); } else { goto handle_unusual; } break; } // .google.container.v1beta1.NodeManagement management = 5; case 5: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, mutable_management())); } else { goto handle_unusual; } break; } // string name = 7; case 7: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_name())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.SetNodePoolManagementRequest.name")); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.SetNodePoolManagementRequest) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.SetNodePoolManagementRequest) return false; #undef DO_ } void SetNodePoolManagementRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.SetNodePoolManagementRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string project_id = 1; if (this->project_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetNodePoolManagementRequest.project_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->project_id(), output); } // string zone = 2; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetNodePoolManagementRequest.zone"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->zone(), output); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetNodePoolManagementRequest.cluster_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 3, this->cluster_id(), output); } // string node_pool_id = 4; if (this->node_pool_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->node_pool_id().data(), static_cast<int>(this->node_pool_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetNodePoolManagementRequest.node_pool_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 4, this->node_pool_id(), output); } // .google.container.v1beta1.NodeManagement management = 5; if (this->has_management()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 5, this->_internal_management(), output); } // string name = 7; if (this->name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetNodePoolManagementRequest.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 7, this->name(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.SetNodePoolManagementRequest) } ::google::protobuf::uint8* SetNodePoolManagementRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.SetNodePoolManagementRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string project_id = 1; if (this->project_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetNodePoolManagementRequest.project_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->project_id(), target); } // string zone = 2; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetNodePoolManagementRequest.zone"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->zone(), target); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetNodePoolManagementRequest.cluster_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 3, this->cluster_id(), target); } // string node_pool_id = 4; if (this->node_pool_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->node_pool_id().data(), static_cast<int>(this->node_pool_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetNodePoolManagementRequest.node_pool_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 4, this->node_pool_id(), target); } // .google.container.v1beta1.NodeManagement management = 5; if (this->has_management()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 5, this->_internal_management(), deterministic, target); } // string name = 7; if (this->name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetNodePoolManagementRequest.name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 7, this->name(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.SetNodePoolManagementRequest) return target; } size_t SetNodePoolManagementRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.SetNodePoolManagementRequest) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // string project_id = 1; if (this->project_id().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->project_id()); } // string zone = 2; if (this->zone().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->zone()); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->cluster_id()); } // string node_pool_id = 4; if (this->node_pool_id().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->node_pool_id()); } // string name = 7; if (this->name().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->name()); } // .google.container.v1beta1.NodeManagement management = 5; if (this->has_management()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *management_); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void SetNodePoolManagementRequest::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.SetNodePoolManagementRequest) GOOGLE_DCHECK_NE(&from, this); const SetNodePoolManagementRequest* source = ::google::protobuf::internal::DynamicCastToGenerated<const SetNodePoolManagementRequest>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.SetNodePoolManagementRequest) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.SetNodePoolManagementRequest) MergeFrom(*source); } } void SetNodePoolManagementRequest::MergeFrom(const SetNodePoolManagementRequest& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.SetNodePoolManagementRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.project_id().size() > 0) { project_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_id_); } if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } if (from.cluster_id().size() > 0) { cluster_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cluster_id_); } if (from.node_pool_id().size() > 0) { node_pool_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.node_pool_id_); } if (from.name().size() > 0) { name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } if (from.has_management()) { mutable_management()->::google::container::v1beta1::NodeManagement::MergeFrom(from.management()); } } void SetNodePoolManagementRequest::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.SetNodePoolManagementRequest) if (&from == this) return; Clear(); MergeFrom(from); } void SetNodePoolManagementRequest::CopyFrom(const SetNodePoolManagementRequest& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.SetNodePoolManagementRequest) if (&from == this) return; Clear(); MergeFrom(from); } bool SetNodePoolManagementRequest::IsInitialized() const { return true; } void SetNodePoolManagementRequest::Swap(SetNodePoolManagementRequest* other) { if (other == this) return; InternalSwap(other); } void SetNodePoolManagementRequest::InternalSwap(SetNodePoolManagementRequest* other) { using std::swap; project_id_.Swap(&other->project_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); zone_.Swap(&other->zone_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); cluster_id_.Swap(&other->cluster_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); node_pool_id_.Swap(&other->node_pool_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(management_, other->management_); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata SetNodePoolManagementRequest::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void RollbackNodePoolUpgradeRequest::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int RollbackNodePoolUpgradeRequest::kProjectIdFieldNumber; const int RollbackNodePoolUpgradeRequest::kZoneFieldNumber; const int RollbackNodePoolUpgradeRequest::kClusterIdFieldNumber; const int RollbackNodePoolUpgradeRequest::kNodePoolIdFieldNumber; const int RollbackNodePoolUpgradeRequest::kNameFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 RollbackNodePoolUpgradeRequest::RollbackNodePoolUpgradeRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_RollbackNodePoolUpgradeRequest.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.RollbackNodePoolUpgradeRequest) } RollbackNodePoolUpgradeRequest::RollbackNodePoolUpgradeRequest(const RollbackNodePoolUpgradeRequest& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); project_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.project_id().size() > 0) { project_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_id_); } zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } cluster_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.cluster_id().size() > 0) { cluster_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cluster_id_); } node_pool_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.node_pool_id().size() > 0) { node_pool_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.node_pool_id_); } name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.name().size() > 0) { name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.RollbackNodePoolUpgradeRequest) } void RollbackNodePoolUpgradeRequest::SharedCtor() { project_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); node_pool_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } RollbackNodePoolUpgradeRequest::~RollbackNodePoolUpgradeRequest() { // @@protoc_insertion_point(destructor:google.container.v1beta1.RollbackNodePoolUpgradeRequest) SharedDtor(); } void RollbackNodePoolUpgradeRequest::SharedDtor() { project_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); node_pool_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } void RollbackNodePoolUpgradeRequest::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* RollbackNodePoolUpgradeRequest::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const RollbackNodePoolUpgradeRequest& RollbackNodePoolUpgradeRequest::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_RollbackNodePoolUpgradeRequest.base); return *internal_default_instance(); } void RollbackNodePoolUpgradeRequest::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.RollbackNodePoolUpgradeRequest) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; project_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); node_pool_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); _internal_metadata_.Clear(); } bool RollbackNodePoolUpgradeRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.RollbackNodePoolUpgradeRequest) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string project_id = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_project_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.RollbackNodePoolUpgradeRequest.project_id")); } else { goto handle_unusual; } break; } // string zone = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_zone())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.RollbackNodePoolUpgradeRequest.zone")); } else { goto handle_unusual; } break; } // string cluster_id = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_cluster_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.RollbackNodePoolUpgradeRequest.cluster_id")); } else { goto handle_unusual; } break; } // string node_pool_id = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_node_pool_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->node_pool_id().data(), static_cast<int>(this->node_pool_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.RollbackNodePoolUpgradeRequest.node_pool_id")); } else { goto handle_unusual; } break; } // string name = 6; case 6: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_name())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.RollbackNodePoolUpgradeRequest.name")); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.RollbackNodePoolUpgradeRequest) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.RollbackNodePoolUpgradeRequest) return false; #undef DO_ } void RollbackNodePoolUpgradeRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.RollbackNodePoolUpgradeRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string project_id = 1; if (this->project_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.RollbackNodePoolUpgradeRequest.project_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->project_id(), output); } // string zone = 2; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.RollbackNodePoolUpgradeRequest.zone"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->zone(), output); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.RollbackNodePoolUpgradeRequest.cluster_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 3, this->cluster_id(), output); } // string node_pool_id = 4; if (this->node_pool_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->node_pool_id().data(), static_cast<int>(this->node_pool_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.RollbackNodePoolUpgradeRequest.node_pool_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 4, this->node_pool_id(), output); } // string name = 6; if (this->name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.RollbackNodePoolUpgradeRequest.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 6, this->name(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.RollbackNodePoolUpgradeRequest) } ::google::protobuf::uint8* RollbackNodePoolUpgradeRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.RollbackNodePoolUpgradeRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string project_id = 1; if (this->project_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.RollbackNodePoolUpgradeRequest.project_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->project_id(), target); } // string zone = 2; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.RollbackNodePoolUpgradeRequest.zone"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->zone(), target); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.RollbackNodePoolUpgradeRequest.cluster_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 3, this->cluster_id(), target); } // string node_pool_id = 4; if (this->node_pool_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->node_pool_id().data(), static_cast<int>(this->node_pool_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.RollbackNodePoolUpgradeRequest.node_pool_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 4, this->node_pool_id(), target); } // string name = 6; if (this->name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.RollbackNodePoolUpgradeRequest.name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 6, this->name(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.RollbackNodePoolUpgradeRequest) return target; } size_t RollbackNodePoolUpgradeRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.RollbackNodePoolUpgradeRequest) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // string project_id = 1; if (this->project_id().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->project_id()); } // string zone = 2; if (this->zone().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->zone()); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->cluster_id()); } // string node_pool_id = 4; if (this->node_pool_id().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->node_pool_id()); } // string name = 6; if (this->name().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->name()); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void RollbackNodePoolUpgradeRequest::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.RollbackNodePoolUpgradeRequest) GOOGLE_DCHECK_NE(&from, this); const RollbackNodePoolUpgradeRequest* source = ::google::protobuf::internal::DynamicCastToGenerated<const RollbackNodePoolUpgradeRequest>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.RollbackNodePoolUpgradeRequest) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.RollbackNodePoolUpgradeRequest) MergeFrom(*source); } } void RollbackNodePoolUpgradeRequest::MergeFrom(const RollbackNodePoolUpgradeRequest& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.RollbackNodePoolUpgradeRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.project_id().size() > 0) { project_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_id_); } if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } if (from.cluster_id().size() > 0) { cluster_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cluster_id_); } if (from.node_pool_id().size() > 0) { node_pool_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.node_pool_id_); } if (from.name().size() > 0) { name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } } void RollbackNodePoolUpgradeRequest::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.RollbackNodePoolUpgradeRequest) if (&from == this) return; Clear(); MergeFrom(from); } void RollbackNodePoolUpgradeRequest::CopyFrom(const RollbackNodePoolUpgradeRequest& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.RollbackNodePoolUpgradeRequest) if (&from == this) return; Clear(); MergeFrom(from); } bool RollbackNodePoolUpgradeRequest::IsInitialized() const { return true; } void RollbackNodePoolUpgradeRequest::Swap(RollbackNodePoolUpgradeRequest* other) { if (other == this) return; InternalSwap(other); } void RollbackNodePoolUpgradeRequest::InternalSwap(RollbackNodePoolUpgradeRequest* other) { using std::swap; project_id_.Swap(&other->project_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); zone_.Swap(&other->zone_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); cluster_id_.Swap(&other->cluster_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); node_pool_id_.Swap(&other->node_pool_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata RollbackNodePoolUpgradeRequest::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void ListNodePoolsResponse::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int ListNodePoolsResponse::kNodePoolsFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 ListNodePoolsResponse::ListNodePoolsResponse() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_ListNodePoolsResponse.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.ListNodePoolsResponse) } ListNodePoolsResponse::ListNodePoolsResponse(const ListNodePoolsResponse& from) : ::google::protobuf::Message(), _internal_metadata_(NULL), node_pools_(from.node_pools_) { _internal_metadata_.MergeFrom(from._internal_metadata_); // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.ListNodePoolsResponse) } void ListNodePoolsResponse::SharedCtor() { } ListNodePoolsResponse::~ListNodePoolsResponse() { // @@protoc_insertion_point(destructor:google.container.v1beta1.ListNodePoolsResponse) SharedDtor(); } void ListNodePoolsResponse::SharedDtor() { } void ListNodePoolsResponse::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* ListNodePoolsResponse::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const ListNodePoolsResponse& ListNodePoolsResponse::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_ListNodePoolsResponse.base); return *internal_default_instance(); } void ListNodePoolsResponse::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.ListNodePoolsResponse) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; node_pools_.Clear(); _internal_metadata_.Clear(); } bool ListNodePoolsResponse::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.ListNodePoolsResponse) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // repeated .google.container.v1beta1.NodePool node_pools = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, add_node_pools())); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.ListNodePoolsResponse) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.ListNodePoolsResponse) return false; #undef DO_ } void ListNodePoolsResponse::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.ListNodePoolsResponse) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated .google.container.v1beta1.NodePool node_pools = 1; for (unsigned int i = 0, n = static_cast<unsigned int>(this->node_pools_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 1, this->node_pools(static_cast<int>(i)), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.ListNodePoolsResponse) } ::google::protobuf::uint8* ListNodePoolsResponse::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.ListNodePoolsResponse) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated .google.container.v1beta1.NodePool node_pools = 1; for (unsigned int i = 0, n = static_cast<unsigned int>(this->node_pools_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 1, this->node_pools(static_cast<int>(i)), deterministic, target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.ListNodePoolsResponse) return target; } size_t ListNodePoolsResponse::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.ListNodePoolsResponse) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // repeated .google.container.v1beta1.NodePool node_pools = 1; { unsigned int count = static_cast<unsigned int>(this->node_pools_size()); total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSize( this->node_pools(static_cast<int>(i))); } } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void ListNodePoolsResponse::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.ListNodePoolsResponse) GOOGLE_DCHECK_NE(&from, this); const ListNodePoolsResponse* source = ::google::protobuf::internal::DynamicCastToGenerated<const ListNodePoolsResponse>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.ListNodePoolsResponse) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.ListNodePoolsResponse) MergeFrom(*source); } } void ListNodePoolsResponse::MergeFrom(const ListNodePoolsResponse& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.ListNodePoolsResponse) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; node_pools_.MergeFrom(from.node_pools_); } void ListNodePoolsResponse::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.ListNodePoolsResponse) if (&from == this) return; Clear(); MergeFrom(from); } void ListNodePoolsResponse::CopyFrom(const ListNodePoolsResponse& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.ListNodePoolsResponse) if (&from == this) return; Clear(); MergeFrom(from); } bool ListNodePoolsResponse::IsInitialized() const { return true; } void ListNodePoolsResponse::Swap(ListNodePoolsResponse* other) { if (other == this) return; InternalSwap(other); } void ListNodePoolsResponse::InternalSwap(ListNodePoolsResponse* other) { using std::swap; CastToBase(&node_pools_)->InternalSwap(CastToBase(&other->node_pools_)); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata ListNodePoolsResponse::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void NodePoolAutoscaling::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int NodePoolAutoscaling::kEnabledFieldNumber; const int NodePoolAutoscaling::kMinNodeCountFieldNumber; const int NodePoolAutoscaling::kMaxNodeCountFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 NodePoolAutoscaling::NodePoolAutoscaling() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_NodePoolAutoscaling.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.NodePoolAutoscaling) } NodePoolAutoscaling::NodePoolAutoscaling(const NodePoolAutoscaling& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); ::memcpy(&enabled_, &from.enabled_, static_cast<size_t>(reinterpret_cast<char*>(&max_node_count_) - reinterpret_cast<char*>(&enabled_)) + sizeof(max_node_count_)); // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.NodePoolAutoscaling) } void NodePoolAutoscaling::SharedCtor() { ::memset(&enabled_, 0, static_cast<size_t>( reinterpret_cast<char*>(&max_node_count_) - reinterpret_cast<char*>(&enabled_)) + sizeof(max_node_count_)); } NodePoolAutoscaling::~NodePoolAutoscaling() { // @@protoc_insertion_point(destructor:google.container.v1beta1.NodePoolAutoscaling) SharedDtor(); } void NodePoolAutoscaling::SharedDtor() { } void NodePoolAutoscaling::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* NodePoolAutoscaling::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const NodePoolAutoscaling& NodePoolAutoscaling::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_NodePoolAutoscaling.base); return *internal_default_instance(); } void NodePoolAutoscaling::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.NodePoolAutoscaling) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; ::memset(&enabled_, 0, static_cast<size_t>( reinterpret_cast<char*>(&max_node_count_) - reinterpret_cast<char*>(&enabled_)) + sizeof(max_node_count_)); _internal_metadata_.Clear(); } bool NodePoolAutoscaling::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.NodePoolAutoscaling) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // bool enabled = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( input, &enabled_))); } else { goto handle_unusual; } break; } // int32 min_node_count = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &min_node_count_))); } else { goto handle_unusual; } break; } // int32 max_node_count = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &max_node_count_))); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.NodePoolAutoscaling) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.NodePoolAutoscaling) return false; #undef DO_ } void NodePoolAutoscaling::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.NodePoolAutoscaling) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // bool enabled = 1; if (this->enabled() != 0) { ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->enabled(), output); } // int32 min_node_count = 2; if (this->min_node_count() != 0) { ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->min_node_count(), output); } // int32 max_node_count = 3; if (this->max_node_count() != 0) { ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->max_node_count(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.NodePoolAutoscaling) } ::google::protobuf::uint8* NodePoolAutoscaling::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.NodePoolAutoscaling) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // bool enabled = 1; if (this->enabled() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->enabled(), target); } // int32 min_node_count = 2; if (this->min_node_count() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->min_node_count(), target); } // int32 max_node_count = 3; if (this->max_node_count() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->max_node_count(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.NodePoolAutoscaling) return target; } size_t NodePoolAutoscaling::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.NodePoolAutoscaling) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // bool enabled = 1; if (this->enabled() != 0) { total_size += 1 + 1; } // int32 min_node_count = 2; if (this->min_node_count() != 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( this->min_node_count()); } // int32 max_node_count = 3; if (this->max_node_count() != 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( this->max_node_count()); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void NodePoolAutoscaling::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.NodePoolAutoscaling) GOOGLE_DCHECK_NE(&from, this); const NodePoolAutoscaling* source = ::google::protobuf::internal::DynamicCastToGenerated<const NodePoolAutoscaling>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.NodePoolAutoscaling) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.NodePoolAutoscaling) MergeFrom(*source); } } void NodePoolAutoscaling::MergeFrom(const NodePoolAutoscaling& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.NodePoolAutoscaling) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.enabled() != 0) { set_enabled(from.enabled()); } if (from.min_node_count() != 0) { set_min_node_count(from.min_node_count()); } if (from.max_node_count() != 0) { set_max_node_count(from.max_node_count()); } } void NodePoolAutoscaling::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.NodePoolAutoscaling) if (&from == this) return; Clear(); MergeFrom(from); } void NodePoolAutoscaling::CopyFrom(const NodePoolAutoscaling& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.NodePoolAutoscaling) if (&from == this) return; Clear(); MergeFrom(from); } bool NodePoolAutoscaling::IsInitialized() const { return true; } void NodePoolAutoscaling::Swap(NodePoolAutoscaling* other) { if (other == this) return; InternalSwap(other); } void NodePoolAutoscaling::InternalSwap(NodePoolAutoscaling* other) { using std::swap; swap(enabled_, other->enabled_); swap(min_node_count_, other->min_node_count_); swap(max_node_count_, other->max_node_count_); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata NodePoolAutoscaling::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== SetLabelsRequest_ResourceLabelsEntry_DoNotUse::SetLabelsRequest_ResourceLabelsEntry_DoNotUse() {} SetLabelsRequest_ResourceLabelsEntry_DoNotUse::SetLabelsRequest_ResourceLabelsEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {} void SetLabelsRequest_ResourceLabelsEntry_DoNotUse::MergeFrom(const SetLabelsRequest_ResourceLabelsEntry_DoNotUse& other) { MergeFromInternal(other); } ::google::protobuf::Metadata SetLabelsRequest_ResourceLabelsEntry_DoNotUse::GetMetadata() const { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[46]; } void SetLabelsRequest_ResourceLabelsEntry_DoNotUse::MergeFrom( const ::google::protobuf::Message& other) { ::google::protobuf::Message::MergeFrom(other); } // =================================================================== void SetLabelsRequest::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int SetLabelsRequest::kProjectIdFieldNumber; const int SetLabelsRequest::kZoneFieldNumber; const int SetLabelsRequest::kClusterIdFieldNumber; const int SetLabelsRequest::kResourceLabelsFieldNumber; const int SetLabelsRequest::kLabelFingerprintFieldNumber; const int SetLabelsRequest::kNameFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 SetLabelsRequest::SetLabelsRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_SetLabelsRequest.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.SetLabelsRequest) } SetLabelsRequest::SetLabelsRequest(const SetLabelsRequest& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); resource_labels_.MergeFrom(from.resource_labels_); project_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.project_id().size() > 0) { project_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_id_); } zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } cluster_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.cluster_id().size() > 0) { cluster_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cluster_id_); } label_fingerprint_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.label_fingerprint().size() > 0) { label_fingerprint_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.label_fingerprint_); } name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.name().size() > 0) { name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.SetLabelsRequest) } void SetLabelsRequest::SharedCtor() { project_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); label_fingerprint_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } SetLabelsRequest::~SetLabelsRequest() { // @@protoc_insertion_point(destructor:google.container.v1beta1.SetLabelsRequest) SharedDtor(); } void SetLabelsRequest::SharedDtor() { project_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); label_fingerprint_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } void SetLabelsRequest::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* SetLabelsRequest::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const SetLabelsRequest& SetLabelsRequest::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_SetLabelsRequest.base); return *internal_default_instance(); } void SetLabelsRequest::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.SetLabelsRequest) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; resource_labels_.Clear(); project_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); label_fingerprint_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); _internal_metadata_.Clear(); } bool SetLabelsRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.SetLabelsRequest) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string project_id = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_project_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.SetLabelsRequest.project_id")); } else { goto handle_unusual; } break; } // string zone = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_zone())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.SetLabelsRequest.zone")); } else { goto handle_unusual; } break; } // string cluster_id = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_cluster_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.SetLabelsRequest.cluster_id")); } else { goto handle_unusual; } break; } // map<string, string> resource_labels = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { SetLabelsRequest_ResourceLabelsEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField< SetLabelsRequest_ResourceLabelsEntry_DoNotUse, ::std::string, ::std::string, ::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::google::protobuf::internal::WireFormatLite::TYPE_STRING, 0 >, ::google::protobuf::Map< ::std::string, ::std::string > > parser(&resource_labels_); DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, &parser)); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( parser.key().data(), static_cast<int>(parser.key().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.SetLabelsRequest.ResourceLabelsEntry.key")); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( parser.value().data(), static_cast<int>(parser.value().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.SetLabelsRequest.ResourceLabelsEntry.value")); } else { goto handle_unusual; } break; } // string label_fingerprint = 5; case 5: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_label_fingerprint())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->label_fingerprint().data(), static_cast<int>(this->label_fingerprint().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.SetLabelsRequest.label_fingerprint")); } else { goto handle_unusual; } break; } // string name = 7; case 7: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_name())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.SetLabelsRequest.name")); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.SetLabelsRequest) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.SetLabelsRequest) return false; #undef DO_ } void SetLabelsRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.SetLabelsRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string project_id = 1; if (this->project_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetLabelsRequest.project_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->project_id(), output); } // string zone = 2; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetLabelsRequest.zone"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->zone(), output); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetLabelsRequest.cluster_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 3, this->cluster_id(), output); } // map<string, string> resource_labels = 4; if (!this->resource_labels().empty()) { typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer ConstPtr; typedef ConstPtr SortItem; typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less; struct Utf8Check { static void Check(ConstPtr p) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( p->first.data(), static_cast<int>(p->first.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetLabelsRequest.ResourceLabelsEntry.key"); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( p->second.data(), static_cast<int>(p->second.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetLabelsRequest.ResourceLabelsEntry.value"); } }; if (output->IsSerializationDeterministic() && this->resource_labels().size() > 1) { ::std::unique_ptr<SortItem[]> items( new SortItem[this->resource_labels().size()]); typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type; size_type n = 0; for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator it = this->resource_labels().begin(); it != this->resource_labels().end(); ++it, ++n) { items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); } ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); ::std::unique_ptr<SetLabelsRequest_ResourceLabelsEntry_DoNotUse> entry; for (size_type i = 0; i < n; i++) { entry.reset(resource_labels_.NewEntryWrapper( items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second)); ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 4, *entry, output); Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]); } } else { ::std::unique_ptr<SetLabelsRequest_ResourceLabelsEntry_DoNotUse> entry; for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator it = this->resource_labels().begin(); it != this->resource_labels().end(); ++it) { entry.reset(resource_labels_.NewEntryWrapper( it->first, it->second)); ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 4, *entry, output); Utf8Check::Check(&*it); } } } // string label_fingerprint = 5; if (this->label_fingerprint().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->label_fingerprint().data(), static_cast<int>(this->label_fingerprint().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetLabelsRequest.label_fingerprint"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 5, this->label_fingerprint(), output); } // string name = 7; if (this->name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetLabelsRequest.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 7, this->name(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.SetLabelsRequest) } ::google::protobuf::uint8* SetLabelsRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.SetLabelsRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string project_id = 1; if (this->project_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetLabelsRequest.project_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->project_id(), target); } // string zone = 2; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetLabelsRequest.zone"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->zone(), target); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetLabelsRequest.cluster_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 3, this->cluster_id(), target); } // map<string, string> resource_labels = 4; if (!this->resource_labels().empty()) { typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer ConstPtr; typedef ConstPtr SortItem; typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less; struct Utf8Check { static void Check(ConstPtr p) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( p->first.data(), static_cast<int>(p->first.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetLabelsRequest.ResourceLabelsEntry.key"); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( p->second.data(), static_cast<int>(p->second.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetLabelsRequest.ResourceLabelsEntry.value"); } }; if (deterministic && this->resource_labels().size() > 1) { ::std::unique_ptr<SortItem[]> items( new SortItem[this->resource_labels().size()]); typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type; size_type n = 0; for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator it = this->resource_labels().begin(); it != this->resource_labels().end(); ++it, ++n) { items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); } ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); ::std::unique_ptr<SetLabelsRequest_ResourceLabelsEntry_DoNotUse> entry; for (size_type i = 0; i < n; i++) { entry.reset(resource_labels_.NewEntryWrapper( items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second)); target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageNoVirtualToArray( 4, *entry, deterministic, target); ; Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]); } } else { ::std::unique_ptr<SetLabelsRequest_ResourceLabelsEntry_DoNotUse> entry; for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator it = this->resource_labels().begin(); it != this->resource_labels().end(); ++it) { entry.reset(resource_labels_.NewEntryWrapper( it->first, it->second)); target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageNoVirtualToArray( 4, *entry, deterministic, target); ; Utf8Check::Check(&*it); } } } // string label_fingerprint = 5; if (this->label_fingerprint().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->label_fingerprint().data(), static_cast<int>(this->label_fingerprint().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetLabelsRequest.label_fingerprint"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 5, this->label_fingerprint(), target); } // string name = 7; if (this->name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetLabelsRequest.name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 7, this->name(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.SetLabelsRequest) return target; } size_t SetLabelsRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.SetLabelsRequest) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // map<string, string> resource_labels = 4; total_size += 1 * ::google::protobuf::internal::FromIntSize(this->resource_labels_size()); { ::std::unique_ptr<SetLabelsRequest_ResourceLabelsEntry_DoNotUse> entry; for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator it = this->resource_labels().begin(); it != this->resource_labels().end(); ++it) { entry.reset(resource_labels_.NewEntryWrapper(it->first, it->second)); total_size += ::google::protobuf::internal::WireFormatLite:: MessageSizeNoVirtual(*entry); } } // string project_id = 1; if (this->project_id().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->project_id()); } // string zone = 2; if (this->zone().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->zone()); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->cluster_id()); } // string label_fingerprint = 5; if (this->label_fingerprint().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->label_fingerprint()); } // string name = 7; if (this->name().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->name()); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void SetLabelsRequest::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.SetLabelsRequest) GOOGLE_DCHECK_NE(&from, this); const SetLabelsRequest* source = ::google::protobuf::internal::DynamicCastToGenerated<const SetLabelsRequest>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.SetLabelsRequest) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.SetLabelsRequest) MergeFrom(*source); } } void SetLabelsRequest::MergeFrom(const SetLabelsRequest& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.SetLabelsRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; resource_labels_.MergeFrom(from.resource_labels_); if (from.project_id().size() > 0) { project_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_id_); } if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } if (from.cluster_id().size() > 0) { cluster_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cluster_id_); } if (from.label_fingerprint().size() > 0) { label_fingerprint_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.label_fingerprint_); } if (from.name().size() > 0) { name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } } void SetLabelsRequest::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.SetLabelsRequest) if (&from == this) return; Clear(); MergeFrom(from); } void SetLabelsRequest::CopyFrom(const SetLabelsRequest& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.SetLabelsRequest) if (&from == this) return; Clear(); MergeFrom(from); } bool SetLabelsRequest::IsInitialized() const { return true; } void SetLabelsRequest::Swap(SetLabelsRequest* other) { if (other == this) return; InternalSwap(other); } void SetLabelsRequest::InternalSwap(SetLabelsRequest* other) { using std::swap; resource_labels_.Swap(&other->resource_labels_); project_id_.Swap(&other->project_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); zone_.Swap(&other->zone_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); cluster_id_.Swap(&other->cluster_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); label_fingerprint_.Swap(&other->label_fingerprint_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata SetLabelsRequest::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void SetLegacyAbacRequest::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int SetLegacyAbacRequest::kProjectIdFieldNumber; const int SetLegacyAbacRequest::kZoneFieldNumber; const int SetLegacyAbacRequest::kClusterIdFieldNumber; const int SetLegacyAbacRequest::kEnabledFieldNumber; const int SetLegacyAbacRequest::kNameFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 SetLegacyAbacRequest::SetLegacyAbacRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_SetLegacyAbacRequest.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.SetLegacyAbacRequest) } SetLegacyAbacRequest::SetLegacyAbacRequest(const SetLegacyAbacRequest& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); project_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.project_id().size() > 0) { project_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_id_); } zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } cluster_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.cluster_id().size() > 0) { cluster_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cluster_id_); } name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.name().size() > 0) { name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } enabled_ = from.enabled_; // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.SetLegacyAbacRequest) } void SetLegacyAbacRequest::SharedCtor() { project_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); enabled_ = false; } SetLegacyAbacRequest::~SetLegacyAbacRequest() { // @@protoc_insertion_point(destructor:google.container.v1beta1.SetLegacyAbacRequest) SharedDtor(); } void SetLegacyAbacRequest::SharedDtor() { project_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } void SetLegacyAbacRequest::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* SetLegacyAbacRequest::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const SetLegacyAbacRequest& SetLegacyAbacRequest::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_SetLegacyAbacRequest.base); return *internal_default_instance(); } void SetLegacyAbacRequest::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.SetLegacyAbacRequest) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; project_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); enabled_ = false; _internal_metadata_.Clear(); } bool SetLegacyAbacRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.SetLegacyAbacRequest) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string project_id = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_project_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.SetLegacyAbacRequest.project_id")); } else { goto handle_unusual; } break; } // string zone = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_zone())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.SetLegacyAbacRequest.zone")); } else { goto handle_unusual; } break; } // string cluster_id = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_cluster_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.SetLegacyAbacRequest.cluster_id")); } else { goto handle_unusual; } break; } // bool enabled = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( input, &enabled_))); } else { goto handle_unusual; } break; } // string name = 6; case 6: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_name())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.SetLegacyAbacRequest.name")); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.SetLegacyAbacRequest) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.SetLegacyAbacRequest) return false; #undef DO_ } void SetLegacyAbacRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.SetLegacyAbacRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string project_id = 1; if (this->project_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetLegacyAbacRequest.project_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->project_id(), output); } // string zone = 2; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetLegacyAbacRequest.zone"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->zone(), output); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetLegacyAbacRequest.cluster_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 3, this->cluster_id(), output); } // bool enabled = 4; if (this->enabled() != 0) { ::google::protobuf::internal::WireFormatLite::WriteBool(4, this->enabled(), output); } // string name = 6; if (this->name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetLegacyAbacRequest.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 6, this->name(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.SetLegacyAbacRequest) } ::google::protobuf::uint8* SetLegacyAbacRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.SetLegacyAbacRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string project_id = 1; if (this->project_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetLegacyAbacRequest.project_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->project_id(), target); } // string zone = 2; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetLegacyAbacRequest.zone"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->zone(), target); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetLegacyAbacRequest.cluster_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 3, this->cluster_id(), target); } // bool enabled = 4; if (this->enabled() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(4, this->enabled(), target); } // string name = 6; if (this->name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetLegacyAbacRequest.name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 6, this->name(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.SetLegacyAbacRequest) return target; } size_t SetLegacyAbacRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.SetLegacyAbacRequest) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // string project_id = 1; if (this->project_id().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->project_id()); } // string zone = 2; if (this->zone().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->zone()); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->cluster_id()); } // string name = 6; if (this->name().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->name()); } // bool enabled = 4; if (this->enabled() != 0) { total_size += 1 + 1; } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void SetLegacyAbacRequest::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.SetLegacyAbacRequest) GOOGLE_DCHECK_NE(&from, this); const SetLegacyAbacRequest* source = ::google::protobuf::internal::DynamicCastToGenerated<const SetLegacyAbacRequest>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.SetLegacyAbacRequest) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.SetLegacyAbacRequest) MergeFrom(*source); } } void SetLegacyAbacRequest::MergeFrom(const SetLegacyAbacRequest& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.SetLegacyAbacRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.project_id().size() > 0) { project_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_id_); } if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } if (from.cluster_id().size() > 0) { cluster_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cluster_id_); } if (from.name().size() > 0) { name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } if (from.enabled() != 0) { set_enabled(from.enabled()); } } void SetLegacyAbacRequest::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.SetLegacyAbacRequest) if (&from == this) return; Clear(); MergeFrom(from); } void SetLegacyAbacRequest::CopyFrom(const SetLegacyAbacRequest& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.SetLegacyAbacRequest) if (&from == this) return; Clear(); MergeFrom(from); } bool SetLegacyAbacRequest::IsInitialized() const { return true; } void SetLegacyAbacRequest::Swap(SetLegacyAbacRequest* other) { if (other == this) return; InternalSwap(other); } void SetLegacyAbacRequest::InternalSwap(SetLegacyAbacRequest* other) { using std::swap; project_id_.Swap(&other->project_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); zone_.Swap(&other->zone_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); cluster_id_.Swap(&other->cluster_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(enabled_, other->enabled_); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata SetLegacyAbacRequest::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void StartIPRotationRequest::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int StartIPRotationRequest::kProjectIdFieldNumber; const int StartIPRotationRequest::kZoneFieldNumber; const int StartIPRotationRequest::kClusterIdFieldNumber; const int StartIPRotationRequest::kNameFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 StartIPRotationRequest::StartIPRotationRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_StartIPRotationRequest.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.StartIPRotationRequest) } StartIPRotationRequest::StartIPRotationRequest(const StartIPRotationRequest& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); project_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.project_id().size() > 0) { project_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_id_); } zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } cluster_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.cluster_id().size() > 0) { cluster_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cluster_id_); } name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.name().size() > 0) { name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.StartIPRotationRequest) } void StartIPRotationRequest::SharedCtor() { project_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } StartIPRotationRequest::~StartIPRotationRequest() { // @@protoc_insertion_point(destructor:google.container.v1beta1.StartIPRotationRequest) SharedDtor(); } void StartIPRotationRequest::SharedDtor() { project_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } void StartIPRotationRequest::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* StartIPRotationRequest::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const StartIPRotationRequest& StartIPRotationRequest::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_StartIPRotationRequest.base); return *internal_default_instance(); } void StartIPRotationRequest::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.StartIPRotationRequest) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; project_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); _internal_metadata_.Clear(); } bool StartIPRotationRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.StartIPRotationRequest) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string project_id = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_project_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.StartIPRotationRequest.project_id")); } else { goto handle_unusual; } break; } // string zone = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_zone())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.StartIPRotationRequest.zone")); } else { goto handle_unusual; } break; } // string cluster_id = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_cluster_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.StartIPRotationRequest.cluster_id")); } else { goto handle_unusual; } break; } // string name = 6; case 6: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_name())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.StartIPRotationRequest.name")); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.StartIPRotationRequest) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.StartIPRotationRequest) return false; #undef DO_ } void StartIPRotationRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.StartIPRotationRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string project_id = 1; if (this->project_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.StartIPRotationRequest.project_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->project_id(), output); } // string zone = 2; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.StartIPRotationRequest.zone"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->zone(), output); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.StartIPRotationRequest.cluster_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 3, this->cluster_id(), output); } // string name = 6; if (this->name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.StartIPRotationRequest.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 6, this->name(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.StartIPRotationRequest) } ::google::protobuf::uint8* StartIPRotationRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.StartIPRotationRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string project_id = 1; if (this->project_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.StartIPRotationRequest.project_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->project_id(), target); } // string zone = 2; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.StartIPRotationRequest.zone"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->zone(), target); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.StartIPRotationRequest.cluster_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 3, this->cluster_id(), target); } // string name = 6; if (this->name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.StartIPRotationRequest.name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 6, this->name(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.StartIPRotationRequest) return target; } size_t StartIPRotationRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.StartIPRotationRequest) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // string project_id = 1; if (this->project_id().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->project_id()); } // string zone = 2; if (this->zone().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->zone()); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->cluster_id()); } // string name = 6; if (this->name().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->name()); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void StartIPRotationRequest::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.StartIPRotationRequest) GOOGLE_DCHECK_NE(&from, this); const StartIPRotationRequest* source = ::google::protobuf::internal::DynamicCastToGenerated<const StartIPRotationRequest>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.StartIPRotationRequest) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.StartIPRotationRequest) MergeFrom(*source); } } void StartIPRotationRequest::MergeFrom(const StartIPRotationRequest& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.StartIPRotationRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.project_id().size() > 0) { project_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_id_); } if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } if (from.cluster_id().size() > 0) { cluster_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cluster_id_); } if (from.name().size() > 0) { name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } } void StartIPRotationRequest::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.StartIPRotationRequest) if (&from == this) return; Clear(); MergeFrom(from); } void StartIPRotationRequest::CopyFrom(const StartIPRotationRequest& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.StartIPRotationRequest) if (&from == this) return; Clear(); MergeFrom(from); } bool StartIPRotationRequest::IsInitialized() const { return true; } void StartIPRotationRequest::Swap(StartIPRotationRequest* other) { if (other == this) return; InternalSwap(other); } void StartIPRotationRequest::InternalSwap(StartIPRotationRequest* other) { using std::swap; project_id_.Swap(&other->project_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); zone_.Swap(&other->zone_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); cluster_id_.Swap(&other->cluster_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata StartIPRotationRequest::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void CompleteIPRotationRequest::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int CompleteIPRotationRequest::kProjectIdFieldNumber; const int CompleteIPRotationRequest::kZoneFieldNumber; const int CompleteIPRotationRequest::kClusterIdFieldNumber; const int CompleteIPRotationRequest::kNameFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 CompleteIPRotationRequest::CompleteIPRotationRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_CompleteIPRotationRequest.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.CompleteIPRotationRequest) } CompleteIPRotationRequest::CompleteIPRotationRequest(const CompleteIPRotationRequest& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); project_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.project_id().size() > 0) { project_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_id_); } zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } cluster_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.cluster_id().size() > 0) { cluster_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cluster_id_); } name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.name().size() > 0) { name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.CompleteIPRotationRequest) } void CompleteIPRotationRequest::SharedCtor() { project_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } CompleteIPRotationRequest::~CompleteIPRotationRequest() { // @@protoc_insertion_point(destructor:google.container.v1beta1.CompleteIPRotationRequest) SharedDtor(); } void CompleteIPRotationRequest::SharedDtor() { project_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } void CompleteIPRotationRequest::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* CompleteIPRotationRequest::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const CompleteIPRotationRequest& CompleteIPRotationRequest::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_CompleteIPRotationRequest.base); return *internal_default_instance(); } void CompleteIPRotationRequest::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.CompleteIPRotationRequest) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; project_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); _internal_metadata_.Clear(); } bool CompleteIPRotationRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.CompleteIPRotationRequest) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string project_id = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_project_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.CompleteIPRotationRequest.project_id")); } else { goto handle_unusual; } break; } // string zone = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_zone())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.CompleteIPRotationRequest.zone")); } else { goto handle_unusual; } break; } // string cluster_id = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_cluster_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.CompleteIPRotationRequest.cluster_id")); } else { goto handle_unusual; } break; } // string name = 7; case 7: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_name())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.CompleteIPRotationRequest.name")); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.CompleteIPRotationRequest) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.CompleteIPRotationRequest) return false; #undef DO_ } void CompleteIPRotationRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.CompleteIPRotationRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string project_id = 1; if (this->project_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.CompleteIPRotationRequest.project_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->project_id(), output); } // string zone = 2; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.CompleteIPRotationRequest.zone"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->zone(), output); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.CompleteIPRotationRequest.cluster_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 3, this->cluster_id(), output); } // string name = 7; if (this->name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.CompleteIPRotationRequest.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 7, this->name(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.CompleteIPRotationRequest) } ::google::protobuf::uint8* CompleteIPRotationRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.CompleteIPRotationRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string project_id = 1; if (this->project_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.CompleteIPRotationRequest.project_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->project_id(), target); } // string zone = 2; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.CompleteIPRotationRequest.zone"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->zone(), target); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.CompleteIPRotationRequest.cluster_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 3, this->cluster_id(), target); } // string name = 7; if (this->name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.CompleteIPRotationRequest.name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 7, this->name(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.CompleteIPRotationRequest) return target; } size_t CompleteIPRotationRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.CompleteIPRotationRequest) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // string project_id = 1; if (this->project_id().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->project_id()); } // string zone = 2; if (this->zone().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->zone()); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->cluster_id()); } // string name = 7; if (this->name().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->name()); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void CompleteIPRotationRequest::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.CompleteIPRotationRequest) GOOGLE_DCHECK_NE(&from, this); const CompleteIPRotationRequest* source = ::google::protobuf::internal::DynamicCastToGenerated<const CompleteIPRotationRequest>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.CompleteIPRotationRequest) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.CompleteIPRotationRequest) MergeFrom(*source); } } void CompleteIPRotationRequest::MergeFrom(const CompleteIPRotationRequest& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.CompleteIPRotationRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.project_id().size() > 0) { project_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_id_); } if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } if (from.cluster_id().size() > 0) { cluster_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cluster_id_); } if (from.name().size() > 0) { name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } } void CompleteIPRotationRequest::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.CompleteIPRotationRequest) if (&from == this) return; Clear(); MergeFrom(from); } void CompleteIPRotationRequest::CopyFrom(const CompleteIPRotationRequest& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.CompleteIPRotationRequest) if (&from == this) return; Clear(); MergeFrom(from); } bool CompleteIPRotationRequest::IsInitialized() const { return true; } void CompleteIPRotationRequest::Swap(CompleteIPRotationRequest* other) { if (other == this) return; InternalSwap(other); } void CompleteIPRotationRequest::InternalSwap(CompleteIPRotationRequest* other) { using std::swap; project_id_.Swap(&other->project_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); zone_.Swap(&other->zone_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); cluster_id_.Swap(&other->cluster_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata CompleteIPRotationRequest::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void AcceleratorConfig::InitAsDefaultInstance() { } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int AcceleratorConfig::kAcceleratorCountFieldNumber; const int AcceleratorConfig::kAcceleratorTypeFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 AcceleratorConfig::AcceleratorConfig() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_AcceleratorConfig.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.AcceleratorConfig) } AcceleratorConfig::AcceleratorConfig(const AcceleratorConfig& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); accelerator_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.accelerator_type().size() > 0) { accelerator_type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.accelerator_type_); } accelerator_count_ = from.accelerator_count_; // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.AcceleratorConfig) } void AcceleratorConfig::SharedCtor() { accelerator_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); accelerator_count_ = GOOGLE_LONGLONG(0); } AcceleratorConfig::~AcceleratorConfig() { // @@protoc_insertion_point(destructor:google.container.v1beta1.AcceleratorConfig) SharedDtor(); } void AcceleratorConfig::SharedDtor() { accelerator_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } void AcceleratorConfig::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* AcceleratorConfig::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const AcceleratorConfig& AcceleratorConfig::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_AcceleratorConfig.base); return *internal_default_instance(); } void AcceleratorConfig::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.AcceleratorConfig) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; accelerator_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); accelerator_count_ = GOOGLE_LONGLONG(0); _internal_metadata_.Clear(); } bool AcceleratorConfig::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.AcceleratorConfig) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // int64 accelerator_count = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( input, &accelerator_count_))); } else { goto handle_unusual; } break; } // string accelerator_type = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_accelerator_type())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->accelerator_type().data(), static_cast<int>(this->accelerator_type().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.AcceleratorConfig.accelerator_type")); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.AcceleratorConfig) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.AcceleratorConfig) return false; #undef DO_ } void AcceleratorConfig::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.AcceleratorConfig) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // int64 accelerator_count = 1; if (this->accelerator_count() != 0) { ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->accelerator_count(), output); } // string accelerator_type = 2; if (this->accelerator_type().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->accelerator_type().data(), static_cast<int>(this->accelerator_type().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.AcceleratorConfig.accelerator_type"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->accelerator_type(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.AcceleratorConfig) } ::google::protobuf::uint8* AcceleratorConfig::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.AcceleratorConfig) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // int64 accelerator_count = 1; if (this->accelerator_count() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->accelerator_count(), target); } // string accelerator_type = 2; if (this->accelerator_type().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->accelerator_type().data(), static_cast<int>(this->accelerator_type().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.AcceleratorConfig.accelerator_type"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->accelerator_type(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.AcceleratorConfig) return target; } size_t AcceleratorConfig::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.AcceleratorConfig) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // string accelerator_type = 2; if (this->accelerator_type().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->accelerator_type()); } // int64 accelerator_count = 1; if (this->accelerator_count() != 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int64Size( this->accelerator_count()); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void AcceleratorConfig::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.AcceleratorConfig) GOOGLE_DCHECK_NE(&from, this); const AcceleratorConfig* source = ::google::protobuf::internal::DynamicCastToGenerated<const AcceleratorConfig>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.AcceleratorConfig) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.AcceleratorConfig) MergeFrom(*source); } } void AcceleratorConfig::MergeFrom(const AcceleratorConfig& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.AcceleratorConfig) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.accelerator_type().size() > 0) { accelerator_type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.accelerator_type_); } if (from.accelerator_count() != 0) { set_accelerator_count(from.accelerator_count()); } } void AcceleratorConfig::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.AcceleratorConfig) if (&from == this) return; Clear(); MergeFrom(from); } void AcceleratorConfig::CopyFrom(const AcceleratorConfig& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.AcceleratorConfig) if (&from == this) return; Clear(); MergeFrom(from); } bool AcceleratorConfig::IsInitialized() const { return true; } void AcceleratorConfig::Swap(AcceleratorConfig* other) { if (other == this) return; InternalSwap(other); } void AcceleratorConfig::InternalSwap(AcceleratorConfig* other) { using std::swap; accelerator_type_.Swap(&other->accelerator_type_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(accelerator_count_, other->accelerator_count_); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata AcceleratorConfig::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void SetNetworkPolicyRequest::InitAsDefaultInstance() { ::google::container::v1beta1::_SetNetworkPolicyRequest_default_instance_._instance.get_mutable()->network_policy_ = const_cast< ::google::container::v1beta1::NetworkPolicy*>( ::google::container::v1beta1::NetworkPolicy::internal_default_instance()); } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int SetNetworkPolicyRequest::kProjectIdFieldNumber; const int SetNetworkPolicyRequest::kZoneFieldNumber; const int SetNetworkPolicyRequest::kClusterIdFieldNumber; const int SetNetworkPolicyRequest::kNetworkPolicyFieldNumber; const int SetNetworkPolicyRequest::kNameFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 SetNetworkPolicyRequest::SetNetworkPolicyRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_SetNetworkPolicyRequest.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.SetNetworkPolicyRequest) } SetNetworkPolicyRequest::SetNetworkPolicyRequest(const SetNetworkPolicyRequest& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); project_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.project_id().size() > 0) { project_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_id_); } zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } cluster_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.cluster_id().size() > 0) { cluster_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cluster_id_); } name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.name().size() > 0) { name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } if (from.has_network_policy()) { network_policy_ = new ::google::container::v1beta1::NetworkPolicy(*from.network_policy_); } else { network_policy_ = NULL; } // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.SetNetworkPolicyRequest) } void SetNetworkPolicyRequest::SharedCtor() { project_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); network_policy_ = NULL; } SetNetworkPolicyRequest::~SetNetworkPolicyRequest() { // @@protoc_insertion_point(destructor:google.container.v1beta1.SetNetworkPolicyRequest) SharedDtor(); } void SetNetworkPolicyRequest::SharedDtor() { project_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete network_policy_; } void SetNetworkPolicyRequest::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* SetNetworkPolicyRequest::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const SetNetworkPolicyRequest& SetNetworkPolicyRequest::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_SetNetworkPolicyRequest.base); return *internal_default_instance(); } void SetNetworkPolicyRequest::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.SetNetworkPolicyRequest) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; project_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (GetArenaNoVirtual() == NULL && network_policy_ != NULL) { delete network_policy_; } network_policy_ = NULL; _internal_metadata_.Clear(); } bool SetNetworkPolicyRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.SetNetworkPolicyRequest) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string project_id = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_project_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.SetNetworkPolicyRequest.project_id")); } else { goto handle_unusual; } break; } // string zone = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_zone())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.SetNetworkPolicyRequest.zone")); } else { goto handle_unusual; } break; } // string cluster_id = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_cluster_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.SetNetworkPolicyRequest.cluster_id")); } else { goto handle_unusual; } break; } // .google.container.v1beta1.NetworkPolicy network_policy = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, mutable_network_policy())); } else { goto handle_unusual; } break; } // string name = 6; case 6: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_name())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.SetNetworkPolicyRequest.name")); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.SetNetworkPolicyRequest) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.SetNetworkPolicyRequest) return false; #undef DO_ } void SetNetworkPolicyRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.SetNetworkPolicyRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string project_id = 1; if (this->project_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetNetworkPolicyRequest.project_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->project_id(), output); } // string zone = 2; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetNetworkPolicyRequest.zone"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->zone(), output); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetNetworkPolicyRequest.cluster_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 3, this->cluster_id(), output); } // .google.container.v1beta1.NetworkPolicy network_policy = 4; if (this->has_network_policy()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 4, this->_internal_network_policy(), output); } // string name = 6; if (this->name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetNetworkPolicyRequest.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 6, this->name(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.SetNetworkPolicyRequest) } ::google::protobuf::uint8* SetNetworkPolicyRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.SetNetworkPolicyRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string project_id = 1; if (this->project_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetNetworkPolicyRequest.project_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->project_id(), target); } // string zone = 2; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetNetworkPolicyRequest.zone"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->zone(), target); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetNetworkPolicyRequest.cluster_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 3, this->cluster_id(), target); } // .google.container.v1beta1.NetworkPolicy network_policy = 4; if (this->has_network_policy()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 4, this->_internal_network_policy(), deterministic, target); } // string name = 6; if (this->name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetNetworkPolicyRequest.name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 6, this->name(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.SetNetworkPolicyRequest) return target; } size_t SetNetworkPolicyRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.SetNetworkPolicyRequest) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // string project_id = 1; if (this->project_id().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->project_id()); } // string zone = 2; if (this->zone().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->zone()); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->cluster_id()); } // string name = 6; if (this->name().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->name()); } // .google.container.v1beta1.NetworkPolicy network_policy = 4; if (this->has_network_policy()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *network_policy_); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void SetNetworkPolicyRequest::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.SetNetworkPolicyRequest) GOOGLE_DCHECK_NE(&from, this); const SetNetworkPolicyRequest* source = ::google::protobuf::internal::DynamicCastToGenerated<const SetNetworkPolicyRequest>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.SetNetworkPolicyRequest) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.SetNetworkPolicyRequest) MergeFrom(*source); } } void SetNetworkPolicyRequest::MergeFrom(const SetNetworkPolicyRequest& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.SetNetworkPolicyRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.project_id().size() > 0) { project_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_id_); } if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } if (from.cluster_id().size() > 0) { cluster_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cluster_id_); } if (from.name().size() > 0) { name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } if (from.has_network_policy()) { mutable_network_policy()->::google::container::v1beta1::NetworkPolicy::MergeFrom(from.network_policy()); } } void SetNetworkPolicyRequest::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.SetNetworkPolicyRequest) if (&from == this) return; Clear(); MergeFrom(from); } void SetNetworkPolicyRequest::CopyFrom(const SetNetworkPolicyRequest& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.SetNetworkPolicyRequest) if (&from == this) return; Clear(); MergeFrom(from); } bool SetNetworkPolicyRequest::IsInitialized() const { return true; } void SetNetworkPolicyRequest::Swap(SetNetworkPolicyRequest* other) { if (other == this) return; InternalSwap(other); } void SetNetworkPolicyRequest::InternalSwap(SetNetworkPolicyRequest* other) { using std::swap; project_id_.Swap(&other->project_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); zone_.Swap(&other->zone_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); cluster_id_.Swap(&other->cluster_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(network_policy_, other->network_policy_); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata SetNetworkPolicyRequest::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void SetMaintenancePolicyRequest::InitAsDefaultInstance() { ::google::container::v1beta1::_SetMaintenancePolicyRequest_default_instance_._instance.get_mutable()->maintenance_policy_ = const_cast< ::google::container::v1beta1::MaintenancePolicy*>( ::google::container::v1beta1::MaintenancePolicy::internal_default_instance()); } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int SetMaintenancePolicyRequest::kProjectIdFieldNumber; const int SetMaintenancePolicyRequest::kZoneFieldNumber; const int SetMaintenancePolicyRequest::kClusterIdFieldNumber; const int SetMaintenancePolicyRequest::kMaintenancePolicyFieldNumber; const int SetMaintenancePolicyRequest::kNameFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 SetMaintenancePolicyRequest::SetMaintenancePolicyRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { ::google::protobuf::internal::InitSCC( &protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_SetMaintenancePolicyRequest.base); SharedCtor(); // @@protoc_insertion_point(constructor:google.container.v1beta1.SetMaintenancePolicyRequest) } SetMaintenancePolicyRequest::SetMaintenancePolicyRequest(const SetMaintenancePolicyRequest& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { _internal_metadata_.MergeFrom(from._internal_metadata_); project_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.project_id().size() > 0) { project_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_id_); } zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } cluster_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.cluster_id().size() > 0) { cluster_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cluster_id_); } name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.name().size() > 0) { name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } if (from.has_maintenance_policy()) { maintenance_policy_ = new ::google::container::v1beta1::MaintenancePolicy(*from.maintenance_policy_); } else { maintenance_policy_ = NULL; } // @@protoc_insertion_point(copy_constructor:google.container.v1beta1.SetMaintenancePolicyRequest) } void SetMaintenancePolicyRequest::SharedCtor() { project_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); maintenance_policy_ = NULL; } SetMaintenancePolicyRequest::~SetMaintenancePolicyRequest() { // @@protoc_insertion_point(destructor:google.container.v1beta1.SetMaintenancePolicyRequest) SharedDtor(); } void SetMaintenancePolicyRequest::SharedDtor() { project_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete maintenance_policy_; } void SetMaintenancePolicyRequest::SetCachedSize(int size) const { _cached_size_.Set(size); } const ::google::protobuf::Descriptor* SetMaintenancePolicyRequest::descriptor() { ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const SetMaintenancePolicyRequest& SetMaintenancePolicyRequest::default_instance() { ::google::protobuf::internal::InitSCC(&protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::scc_info_SetMaintenancePolicyRequest.base); return *internal_default_instance(); } void SetMaintenancePolicyRequest::Clear() { // @@protoc_insertion_point(message_clear_start:google.container.v1beta1.SetMaintenancePolicyRequest) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; project_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); zone_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); cluster_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (GetArenaNoVirtual() == NULL && maintenance_policy_ != NULL) { delete maintenance_policy_; } maintenance_policy_ = NULL; _internal_metadata_.Clear(); } bool SetMaintenancePolicyRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:google.container.v1beta1.SetMaintenancePolicyRequest) for (;;) { ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // string project_id = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_project_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.SetMaintenancePolicyRequest.project_id")); } else { goto handle_unusual; } break; } // string zone = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_zone())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.SetMaintenancePolicyRequest.zone")); } else { goto handle_unusual; } break; } // string cluster_id = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_cluster_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.SetMaintenancePolicyRequest.cluster_id")); } else { goto handle_unusual; } break; } // .google.container.v1beta1.MaintenancePolicy maintenance_policy = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( input, mutable_maintenance_policy())); } else { goto handle_unusual; } break; } // string name = 5; case 5: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_name())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "google.container.v1beta1.SetMaintenancePolicyRequest.name")); } else { goto handle_unusual; } break; } default: { handle_unusual: if (tag == 0) { goto success; } DO_(::google::protobuf::internal::WireFormat::SkipField( input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } } success: // @@protoc_insertion_point(parse_success:google.container.v1beta1.SetMaintenancePolicyRequest) return true; failure: // @@protoc_insertion_point(parse_failure:google.container.v1beta1.SetMaintenancePolicyRequest) return false; #undef DO_ } void SetMaintenancePolicyRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:google.container.v1beta1.SetMaintenancePolicyRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string project_id = 1; if (this->project_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetMaintenancePolicyRequest.project_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->project_id(), output); } // string zone = 2; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetMaintenancePolicyRequest.zone"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->zone(), output); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetMaintenancePolicyRequest.cluster_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 3, this->cluster_id(), output); } // .google.container.v1beta1.MaintenancePolicy maintenance_policy = 4; if (this->has_maintenance_policy()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 4, this->_internal_maintenance_policy(), output); } // string name = 5; if (this->name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetMaintenancePolicyRequest.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 5, this->name(), output); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } // @@protoc_insertion_point(serialize_end:google.container.v1beta1.SetMaintenancePolicyRequest) } ::google::protobuf::uint8* SetMaintenancePolicyRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.container.v1beta1.SetMaintenancePolicyRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; // string project_id = 1; if (this->project_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->project_id().data(), static_cast<int>(this->project_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetMaintenancePolicyRequest.project_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->project_id(), target); } // string zone = 2; if (this->zone().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->zone().data(), static_cast<int>(this->zone().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetMaintenancePolicyRequest.zone"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->zone(), target); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->cluster_id().data(), static_cast<int>(this->cluster_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetMaintenancePolicyRequest.cluster_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 3, this->cluster_id(), target); } // .google.container.v1beta1.MaintenancePolicy maintenance_policy = 4; if (this->has_maintenance_policy()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 4, this->_internal_maintenance_policy(), deterministic, target); } // string name = 5; if (this->name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast<int>(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.container.v1beta1.SetMaintenancePolicyRequest.name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 5, this->name(), target); } if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } // @@protoc_insertion_point(serialize_to_array_end:google.container.v1beta1.SetMaintenancePolicyRequest) return target; } size_t SetMaintenancePolicyRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.container.v1beta1.SetMaintenancePolicyRequest) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } // string project_id = 1; if (this->project_id().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->project_id()); } // string zone = 2; if (this->zone().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->zone()); } // string cluster_id = 3; if (this->cluster_id().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->cluster_id()); } // string name = 5; if (this->name().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->name()); } // .google.container.v1beta1.MaintenancePolicy maintenance_policy = 4; if (this->has_maintenance_policy()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *maintenance_policy_); } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void SetMaintenancePolicyRequest::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.container.v1beta1.SetMaintenancePolicyRequest) GOOGLE_DCHECK_NE(&from, this); const SetMaintenancePolicyRequest* source = ::google::protobuf::internal::DynamicCastToGenerated<const SetMaintenancePolicyRequest>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.container.v1beta1.SetMaintenancePolicyRequest) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.container.v1beta1.SetMaintenancePolicyRequest) MergeFrom(*source); } } void SetMaintenancePolicyRequest::MergeFrom(const SetMaintenancePolicyRequest& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.container.v1beta1.SetMaintenancePolicyRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.project_id().size() > 0) { project_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.project_id_); } if (from.zone().size() > 0) { zone_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zone_); } if (from.cluster_id().size() > 0) { cluster_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cluster_id_); } if (from.name().size() > 0) { name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } if (from.has_maintenance_policy()) { mutable_maintenance_policy()->::google::container::v1beta1::MaintenancePolicy::MergeFrom(from.maintenance_policy()); } } void SetMaintenancePolicyRequest::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.container.v1beta1.SetMaintenancePolicyRequest) if (&from == this) return; Clear(); MergeFrom(from); } void SetMaintenancePolicyRequest::CopyFrom(const SetMaintenancePolicyRequest& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.container.v1beta1.SetMaintenancePolicyRequest) if (&from == this) return; Clear(); MergeFrom(from); } bool SetMaintenancePolicyRequest::IsInitialized() const { return true; } void SetMaintenancePolicyRequest::Swap(SetMaintenancePolicyRequest* other) { if (other == this) return; InternalSwap(other); } void SetMaintenancePolicyRequest::InternalSwap(SetMaintenancePolicyRequest* other) { using std::swap; project_id_.Swap(&other->project_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); zone_.Swap(&other->zone_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); cluster_id_.Swap(&other->cluster_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(maintenance_policy_, other->maintenance_policy_); _internal_metadata_.Swap(&other->_internal_metadata_); } ::google::protobuf::Metadata SetMaintenancePolicyRequest::GetMetadata() const { protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::protobuf_AssignDescriptorsOnce(); return ::protobuf_google_2fcontainer_2fv1beta1_2fcluster_5fservice_2eproto::file_level_metadata[kIndexInFileMessages]; } // @@protoc_insertion_point(namespace_scope) } // namespace v1beta1 } // namespace container } // namespace google namespace google { namespace protobuf { template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::NodeConfig_MetadataEntry_DoNotUse* Arena::CreateMaybeMessage< ::google::container::v1beta1::NodeConfig_MetadataEntry_DoNotUse >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::NodeConfig_MetadataEntry_DoNotUse >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::NodeConfig_LabelsEntry_DoNotUse* Arena::CreateMaybeMessage< ::google::container::v1beta1::NodeConfig_LabelsEntry_DoNotUse >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::NodeConfig_LabelsEntry_DoNotUse >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::NodeConfig* Arena::CreateMaybeMessage< ::google::container::v1beta1::NodeConfig >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::NodeConfig >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::NodeTaint* Arena::CreateMaybeMessage< ::google::container::v1beta1::NodeTaint >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::NodeTaint >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::MasterAuth* Arena::CreateMaybeMessage< ::google::container::v1beta1::MasterAuth >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::MasterAuth >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::ClientCertificateConfig* Arena::CreateMaybeMessage< ::google::container::v1beta1::ClientCertificateConfig >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::ClientCertificateConfig >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::AddonsConfig* Arena::CreateMaybeMessage< ::google::container::v1beta1::AddonsConfig >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::AddonsConfig >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::HttpLoadBalancing* Arena::CreateMaybeMessage< ::google::container::v1beta1::HttpLoadBalancing >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::HttpLoadBalancing >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::HorizontalPodAutoscaling* Arena::CreateMaybeMessage< ::google::container::v1beta1::HorizontalPodAutoscaling >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::HorizontalPodAutoscaling >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::KubernetesDashboard* Arena::CreateMaybeMessage< ::google::container::v1beta1::KubernetesDashboard >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::KubernetesDashboard >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::NetworkPolicyConfig* Arena::CreateMaybeMessage< ::google::container::v1beta1::NetworkPolicyConfig >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::NetworkPolicyConfig >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::MasterAuthorizedNetworksConfig_CidrBlock* Arena::CreateMaybeMessage< ::google::container::v1beta1::MasterAuthorizedNetworksConfig_CidrBlock >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::MasterAuthorizedNetworksConfig_CidrBlock >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::MasterAuthorizedNetworksConfig* Arena::CreateMaybeMessage< ::google::container::v1beta1::MasterAuthorizedNetworksConfig >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::MasterAuthorizedNetworksConfig >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::NetworkPolicy* Arena::CreateMaybeMessage< ::google::container::v1beta1::NetworkPolicy >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::NetworkPolicy >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::IPAllocationPolicy* Arena::CreateMaybeMessage< ::google::container::v1beta1::IPAllocationPolicy >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::IPAllocationPolicy >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::PodSecurityPolicyConfig* Arena::CreateMaybeMessage< ::google::container::v1beta1::PodSecurityPolicyConfig >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::PodSecurityPolicyConfig >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::Cluster* Arena::CreateMaybeMessage< ::google::container::v1beta1::Cluster >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::Cluster >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::ClusterUpdate* Arena::CreateMaybeMessage< ::google::container::v1beta1::ClusterUpdate >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::ClusterUpdate >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::Operation* Arena::CreateMaybeMessage< ::google::container::v1beta1::Operation >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::Operation >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::CreateClusterRequest* Arena::CreateMaybeMessage< ::google::container::v1beta1::CreateClusterRequest >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::CreateClusterRequest >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::GetClusterRequest* Arena::CreateMaybeMessage< ::google::container::v1beta1::GetClusterRequest >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::GetClusterRequest >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::UpdateClusterRequest* Arena::CreateMaybeMessage< ::google::container::v1beta1::UpdateClusterRequest >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::UpdateClusterRequest >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::SetMasterAuthRequest* Arena::CreateMaybeMessage< ::google::container::v1beta1::SetMasterAuthRequest >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::SetMasterAuthRequest >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::DeleteClusterRequest* Arena::CreateMaybeMessage< ::google::container::v1beta1::DeleteClusterRequest >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::DeleteClusterRequest >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::ListClustersRequest* Arena::CreateMaybeMessage< ::google::container::v1beta1::ListClustersRequest >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::ListClustersRequest >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::ListClustersResponse* Arena::CreateMaybeMessage< ::google::container::v1beta1::ListClustersResponse >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::ListClustersResponse >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::GetOperationRequest* Arena::CreateMaybeMessage< ::google::container::v1beta1::GetOperationRequest >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::GetOperationRequest >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::ListOperationsRequest* Arena::CreateMaybeMessage< ::google::container::v1beta1::ListOperationsRequest >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::ListOperationsRequest >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::CancelOperationRequest* Arena::CreateMaybeMessage< ::google::container::v1beta1::CancelOperationRequest >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::CancelOperationRequest >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::ListOperationsResponse* Arena::CreateMaybeMessage< ::google::container::v1beta1::ListOperationsResponse >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::ListOperationsResponse >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::GetServerConfigRequest* Arena::CreateMaybeMessage< ::google::container::v1beta1::GetServerConfigRequest >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::GetServerConfigRequest >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::ServerConfig* Arena::CreateMaybeMessage< ::google::container::v1beta1::ServerConfig >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::ServerConfig >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::CreateNodePoolRequest* Arena::CreateMaybeMessage< ::google::container::v1beta1::CreateNodePoolRequest >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::CreateNodePoolRequest >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::DeleteNodePoolRequest* Arena::CreateMaybeMessage< ::google::container::v1beta1::DeleteNodePoolRequest >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::DeleteNodePoolRequest >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::ListNodePoolsRequest* Arena::CreateMaybeMessage< ::google::container::v1beta1::ListNodePoolsRequest >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::ListNodePoolsRequest >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::GetNodePoolRequest* Arena::CreateMaybeMessage< ::google::container::v1beta1::GetNodePoolRequest >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::GetNodePoolRequest >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::NodePool* Arena::CreateMaybeMessage< ::google::container::v1beta1::NodePool >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::NodePool >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::NodeManagement* Arena::CreateMaybeMessage< ::google::container::v1beta1::NodeManagement >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::NodeManagement >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::AutoUpgradeOptions* Arena::CreateMaybeMessage< ::google::container::v1beta1::AutoUpgradeOptions >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::AutoUpgradeOptions >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::MaintenancePolicy* Arena::CreateMaybeMessage< ::google::container::v1beta1::MaintenancePolicy >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::MaintenancePolicy >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::MaintenanceWindow* Arena::CreateMaybeMessage< ::google::container::v1beta1::MaintenanceWindow >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::MaintenanceWindow >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::DailyMaintenanceWindow* Arena::CreateMaybeMessage< ::google::container::v1beta1::DailyMaintenanceWindow >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::DailyMaintenanceWindow >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::SetNodePoolManagementRequest* Arena::CreateMaybeMessage< ::google::container::v1beta1::SetNodePoolManagementRequest >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::SetNodePoolManagementRequest >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::RollbackNodePoolUpgradeRequest* Arena::CreateMaybeMessage< ::google::container::v1beta1::RollbackNodePoolUpgradeRequest >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::RollbackNodePoolUpgradeRequest >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::ListNodePoolsResponse* Arena::CreateMaybeMessage< ::google::container::v1beta1::ListNodePoolsResponse >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::ListNodePoolsResponse >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::NodePoolAutoscaling* Arena::CreateMaybeMessage< ::google::container::v1beta1::NodePoolAutoscaling >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::NodePoolAutoscaling >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::SetLabelsRequest_ResourceLabelsEntry_DoNotUse* Arena::CreateMaybeMessage< ::google::container::v1beta1::SetLabelsRequest_ResourceLabelsEntry_DoNotUse >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::SetLabelsRequest_ResourceLabelsEntry_DoNotUse >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::SetLabelsRequest* Arena::CreateMaybeMessage< ::google::container::v1beta1::SetLabelsRequest >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::SetLabelsRequest >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::SetLegacyAbacRequest* Arena::CreateMaybeMessage< ::google::container::v1beta1::SetLegacyAbacRequest >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::SetLegacyAbacRequest >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::StartIPRotationRequest* Arena::CreateMaybeMessage< ::google::container::v1beta1::StartIPRotationRequest >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::StartIPRotationRequest >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::CompleteIPRotationRequest* Arena::CreateMaybeMessage< ::google::container::v1beta1::CompleteIPRotationRequest >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::CompleteIPRotationRequest >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::AcceleratorConfig* Arena::CreateMaybeMessage< ::google::container::v1beta1::AcceleratorConfig >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::AcceleratorConfig >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::SetNetworkPolicyRequest* Arena::CreateMaybeMessage< ::google::container::v1beta1::SetNetworkPolicyRequest >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::SetNetworkPolicyRequest >(arena); } template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::container::v1beta1::SetMaintenancePolicyRequest* Arena::CreateMaybeMessage< ::google::container::v1beta1::SetMaintenancePolicyRequest >(Arena* arena) { return Arena::CreateInternal< ::google::container::v1beta1::SetMaintenancePolicyRequest >(arena); } } // namespace protobuf } // namespace google // @@protoc_insertion_point(global_scope)
[ "ben9694@gmail.com" ]
ben9694@gmail.com
90697b4bbcebc6410677d492bf9aa4a4a777e3ba
cba9fb37a7b0f7bb3a6ef8a075562e71ed0aadc2
/modules/perception/obstacle/camera/detector/yolo_camera_detector/test/yolo_camera_detector_test.cc
ff92b141550a9e45356d5bbbd386746f2c8e7acb
[ "Apache-2.0" ]
permissive
lauvchen/apollo
28bedc347a8afd2202a279bb593d3634c57edf79
48f6ee6df9444497bb50b19173e10d0d59cbf15d
refs/heads/master
2021-04-26T23:28:11.494582
2018-03-06T01:00:20
2018-03-06T01:00:20
null
0
0
null
null
null
null
UTF-8
C++
false
false
9,376
cc
/****************************************************************************** * Copyright 2018 The Apollo Authors. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *****************************************************************************/ #include "modules/common/log.h #include <gtest/gtest.h> #include <caffe/caffe.hpp> #include <opencv2/opencv.hpp> #include "modules/obstacle/camera/common/flags.h" #include "modules/obstacle/camera/common/util.h" #include "modules/obstacle/camera/detector/common/feature_extractor.h" #include "modules/obstacle/camera/detector/yolo_camera_detector/region_output.h" #include "modules/obstacle/camera/detector/yolo_camera_detector/util.h" #include "modules/obstacle/camera/detector/yolo_camera_detector/yolo.pb.h" #include "modules/obstacle/camera/interface/base_camera_detector.h" namespace apollo { namespace perception { namespace obstacle { TEST(YoloCameraDetectorTest, yolo_camera_detector_roipooling_test) { std::string yolo_config = "./data/models/yolo_camera_detector/config.pt"; adu::perception::obstacle::yolo::YoloParam yolo_param; adu::perception::obstacle::yolo::YoloParam origin_yolo_param; { BaseCameraDetector *camera_detector = BaseCameraDetectorRegisterer::get_instance_by_name( "YoloCameraDetector"); CHECK(camera_detector->init()); CHECK_EQ(camera_detector->name(), "YoloCameraDetector"); cv::Mat frame = cv::imread("test.jpg", CV_LOAD_IMAGE_COLOR); CHECK((frame.data != nullptr)); CameraDetectorOptions options; std::vector<VisualObjectPtr> objects; Timer timer; /*CHECK_EQ(camera_detector->detect(frame, options, NULL), false); CHECK(camera_detector->detect(frame, options, &objects)); AINFO << "detection time: " << timer.toc() << "ms"; int obj_idx = 0; for (const auto &obj : objects) { AINFO << "Obj-" << obj_idx++ << ": " << get_object_name(obj->type) << " (feat: " << obj->object_feature.size() << "-D)"; if (obj->object_feature.size() > 0) { float sum_of_squares = 0.0; for (const auto &f : obj->object_feature) { sum_of_squares += f * f; } // EXPECT_LT(abs(sum_of_squares - 1.0), 1e-3); } }*/ std::vector<VisualObjectPtr> mixed_objects; cv::Mat lane_map(frame.rows, frame.cols, CV_32FC1); CHECK(camera_detector->multitask(frame, options, &objects, &lane_map)); cv::imwrite("result.jpg", lane_map); } } /* TEST(YoloCameraDetectorTest, nms_test) { { std::vector<NormalizedBBox> test_objects; NormalizedBBox obj_ped1; obj_ped1.xmin = .1; obj_ped1.xmax = .3; obj_ped1.ymin = .20; obj_ped1.ymax = .60; obj_ped1.score = 0.9; obj_ped1.label = PEDESTRIAN; NormalizedBBox obj_ped2; obj_ped2.xmin = .10; obj_ped2.xmax = .25; obj_ped2.ymin = .30; obj_ped2.ymax = .60; obj_ped2.score = 0.8; obj_ped2.label = PEDESTRIAN; NormalizedBBox obj_ped3; obj_ped3.xmin = .7; obj_ped3.xmax = .8; obj_ped3.ymin = .7; obj_ped3.ymax = .8; obj_ped3.score = 0.01; obj_ped3.label = PEDESTRIAN; test_objects.push_back(obj_ped1); test_objects.push_back(obj_ped2); test_objects.push_back(obj_ped3); std::vector<float> scores; scores.push_back(obj_ped1.score); scores.push_back(obj_ped2.score); scores.push_back(obj_ped3.score); std::vector<int> indices; apply_softnms_fast(test_objects, scores, 0.1, 0.5, 20, &indices, true, 0.4); CHECK_LT(scores[1], 0.8); scores[1] = 0.8; scores[2] = 0.01; apply_softnms_fast(test_objects, scores, 0.1, 0.5, 20, &indices, false, 0.4); CHECK_LT(scores[1], 0.8); scores[1] = 0.8; scores[2] = 0.01; apply_boxvoting_fast(test_objects, scores, 0.1, 0.5, 0.4, &indices); CHECK_LT(test_objects[0].ymin, .30); CHECK_GT(test_objects[0].ymin, .20); CHECK_LT(test_objects[0].xmax, .30); CHECK_GT(test_objects[0].xmax, .20); CHECK_LT(scores[1], 0.8); std::vector<NormalizedBBox> test_empty_objects; std::vector<float> test_empty_scores; apply_boxvoting_fast(test_empty_objects, test_empty_scores, 0.1, 0.5, 0.4, &indices); } { std::vector<NormalizedBBox> test_objects; NormalizedBBox obj_ped1; obj_ped1.xmin = .1; obj_ped1.xmax = .3; obj_ped1.ymin = .20; obj_ped1.ymax = .60; obj_ped1.score = 0.9; obj_ped1.label = PEDESTRIAN; NormalizedBBox obj_ped2; obj_ped2.xmin = .10; obj_ped2.xmax = .25; obj_ped2.ymin = .30; obj_ped2.ymax = .60; obj_ped2.score = 0.8; obj_ped2.label = PEDESTRIAN; NormalizedBBox obj_ped3; obj_ped3.xmin = .7; obj_ped3.xmax = .8; obj_ped3.ymin = .7; obj_ped3.ymax = .8; obj_ped3.score = 0.01; obj_ped3.label = PEDESTRIAN; test_objects.push_back(obj_ped1); test_objects.push_back(obj_ped2); test_objects.push_back(obj_ped3); std::vector<float> scores; scores.push_back(obj_ped1.score); scores.push_back(obj_ped2.score); scores.push_back(obj_ped3.score); std::vector<int> indices; apply_nms_fast(test_objects, scores, 0.1, 0.5, 1, 20, &indices); CHECK_EQ(indices.size(), 1); apply_nms_fast(test_objects, scores, 0.1, 0.5, 0.7, 20, &indices); CHECK_EQ(indices.size(), 1); } { std::vector<NormalizedBBox> test_objects; NormalizedBBox obj_cyc; obj_cyc.xmin = .1; obj_cyc.xmax = .3; obj_cyc.ymin = .20; obj_cyc.ymax = .60; obj_cyc.score = 0.9; obj_cyc.label = BICYCLE; NormalizedBBox obj_ped; obj_ped.xmin = .10; obj_ped.xmax = .25; obj_ped.ymin = .30; obj_ped.ymax = .60; obj_ped.score = 0.95; obj_ped.label = PEDESTRIAN; test_objects.push_back(obj_cyc); test_objects.push_back(obj_ped); std::vector<int> cyc_indices; std::vector<int> ped_indices; cyc_indices.push_back(0); ped_indices.push_back(1); cross_class_merge(&cyc_indices, &ped_indices, test_objects, 0.8); CHECK_EQ(cyc_indices.size(), 1); CHECK_EQ(ped_indices.size(), 0); } std::vector<VisualObjectPtr> visual_objects; for (int i = 0; i < 1; i++) { VisualObjectPtr obj; obj.reset(new VisualObject); obj->alpha = 0; obj->upper_left[0] = 0.1; obj->upper_left[1] = 0.2; obj->lower_right[0] = 0.3; obj->lower_right[1] = 0.4; obj->height = 1.6; obj->width = 1.4; obj->length = 4; obj->center.x() = 0; obj->center.y() = 0; obj->center.z() = 0; obj->theta = 1.1; obj->score = 0.9; obj->type = PEDESTRIAN; visual_objects.push_back(obj); } recover_bbox(10, 10, 5, &visual_objects); CHECK_EQ(visual_objects[0]->upper_left[0], 1); CHECK_EQ(visual_objects[0]->upper_left[1], 7); CHECK_EQ(visual_objects[0]->lower_right[0], 3); CHECK_EQ(visual_objects[0]->lower_right[1], 9); { std::vector<NormalizedBBox> test_empty_objects; std::vector<float> empty_scores; std::vector<int> empty_indices; apply_softnms_fast(test_empty_objects, empty_scores, 0.1, 0.5, 20, &empty_indices, true, 0.8); CHECK_EQ(empty_indices.size(), 0); apply_boxvoting_fast(test_empty_objects, empty_scores, 0.1, 0.5, 20, &empty_indices); CHECK_EQ(empty_indices.size(), 0); } } */ TEST(YoloCameraDetectorTest, input_tensor_test) { std::string yolo_config = "./data/models/yolo_camera_detector/config.pt"; adu::perception::obstacle::yolo::YoloParam yolo_param; adu::perception::obstacle::yolo::YoloParam origin_yolo_param; load_text_proto_message_file(yolo_config, yolo_param); origin_yolo_param.CopyFrom(yolo_param); { std::string out_str; std::ofstream ofs(yolo_config, std::ofstream::out); google::protobuf::TextFormat::PrintToString(yolo_param, &out_str); ofs << out_str; ofs.close(); BaseCameraDetector *camera_detector = BaseCameraDetectorRegisterer::get_instance_by_name( "YoloCameraDetector"); CHECK(camera_detector->init()); } std::string out_str; std::ofstream ofs(yolo_config, std::ofstream::out); google::protobuf::TextFormat::PrintToString(origin_yolo_param, &out_str); ofs << out_str; ofs.close(); } } // namespace obstacle } // namespace perception } // namespace apollo
[ "ycool@users.noreply.github.com" ]
ycool@users.noreply.github.com
e3b3a5f9e737c6d1538641d3e80e6068b7c41e83
60024539adf5e4a83e04be8258793dc4ec078da7
/chapter7/7.17.fun_ptr.cpp
aa4d5c8a10a5254d63fe8418a7e7438a77fbedb2
[]
no_license
agileluo/c--_learn
be1d0fec5b37c4bf85da17a4be31a0f864cab126
ede9e864b9433156645aaebf91847bd0824bb0e9
refs/heads/master
2020-05-20T07:17:31.179856
2013-07-10T07:26:13
2013-07-10T07:26:13
null
0
0
null
null
null
null
UTF-8
C++
false
false
643
cpp
#include <iostream> using namespace std; double agileluo(int line); double cmmi(int line); void estimate(int line, double (*pf)(int line)); int main() { int line; cout << "How many code do you need? " ; cin >> line; cout << "Here is agileuo estamite:" << endl; estimate(line, agileluo); cout << "Here is cmmi estamite:" << endl; estimate(line, cmmi); } void estimate(int line, double (*pf)(int line)){ cout << line << " will take " << pf(line) << " hours" << endl; } double agileluo(int line){ if(line < 20){ return 0.5; }else if(line >= 20){ return 100 / 20 * 0.5; } } double cmmi(int line){ return line * 5 / 60; }
[ "363825970@qq.com" ]
363825970@qq.com
9edcea801be43f85170e7efe8215564a3a4b3309
1c91cbc9a8b2de7cac1ac3c4e9210d1f6e6be13c
/m3d_td1/src/normals.cpp
bad2981bc0c44f16fbba1018f6402ff8c9d32a68
[]
no_license
axelcamus/monde3d
2856d564e7ad667b7d00da6679e12c4e305c59e3
edfebfb4bda970b3b25feeba75a1152bec1a5a4b
refs/heads/master
2021-01-11T22:15:55.795619
2017-01-27T11:27:24
2017-01-27T11:27:24
78,941,052
0
0
null
null
null
null
UTF-8
C++
false
false
625
cpp
#include "integrator.h" #include "scene.h" class NormalsIntegrator : public Integrator { public: NormalsIntegrator(const PropertyList &props) { /* No parameters this time */ } Color3f Li(const Scene *scene, const Ray &ray) const { Hit hit; scene->intersect(ray, hit); if(hit.shape() != NULL){ return Color3f(fabs(hit.normal().x()), fabs(hit.normal().y()), fabs(hit.normal().z())); } return scene->backgroundColor(); } std::string toString() const { return "NormalsIntegrator[]"; } }; REGISTER_CLASS(NormalsIntegrator, "normals")
[ "axecamus@emi.u-bordeaux1.fr" ]
axecamus@emi.u-bordeaux1.fr
a2d3556b0c473622a4905b808af1a6f796dcecd6
d08a64ac14a426d7aec1cb1cf9b4b89d9873e595
/gtfalign/config.cc
5bc2b46a8dab99b21e7b2d6374adf61254f43bd3
[ "BSD-3-Clause" ]
permissive
shulp2211/rnaseqtools
6b3633b92d82c204303f6c01e7cc6686f0d177f7
f2b0fc8dd6d3258e822a97bdfcf426c2d11686f9
refs/heads/master
2020-09-16T17:46:27.020686
2019-06-12T20:36:29
2019-06-12T20:36:29
223,845,353
1
0
BSD-3-Clause
2019-11-25T02:22:48
2019-11-25T02:22:47
null
UTF-8
C++
false
false
392
cc
#include "config.h" #include <cstdlib> #include <iostream> #include <string> #include <fstream> #include <sstream> #include <cstring> using namespace std; double min_transcript_coverage = -1; int parse_parameters(int argc, const char ** argv) { for(int i = 1; i < argc; i++) { if(string(argv[i]) == "-c") { min_transcript_coverage = atof(argv[i + 1]); i++; } } return 0; }
[ "shaomingfu@gmail.com" ]
shaomingfu@gmail.com
cd82e38fdb2fae110d64be668ea246377b9a9665
95ae6fa9cc64bc2f537753475c1b84ae526391b1
/source/tm/pokemon/taunt.hpp
43471c67794888212161a5b35ef298eacfdb6f16
[ "BSL-1.0" ]
permissive
OctalMicrobe/technical-machine
7deeb30cf1ff2eb730bc0ad9efc4794b30c6cf5c
bffa259bd4d069ce104efa21fef34a5342ee0755
refs/heads/master
2023-02-04T00:43:19.534781
2020-12-20T17:21:50
2020-12-20T17:21:50
null
0
0
null
null
null
null
UTF-8
C++
false
false
560
hpp
// Copyright David Stone 2020. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #pragma once #include <tm/pokemon/end_of_turn_counter.hpp> #include <tm/generation.hpp> namespace technicalmachine { template<Generation generation> using TauntCounter = EndOfTurnCounter< generation >= Generation::three, 2, CounterOperations::is_active, CounterOperations::advance_one_turn_variable, CounterOperations::activate >; } // namespace technicalmachine
[ "david@doublewise.net" ]
david@doublewise.net
8d27fc22e7e64cf3020d04fc3f311d8c7be2bd04
cf2dbfb0713d4f90d8d48b6803ce21c9da337bd0
/include/IOLibrary/FileFinder.h
566fe57ebdf15e579a1bcbba33d2fba80ab91e07
[]
no_license
songnan531/Projects
47867b1434280fa7259c4bbd329106d789a66b8b
cfc526a2ffb28449ab1acac97c56bbb0ead74f79
refs/heads/master
2020-12-25T13:51:53.744436
2014-12-20T21:47:21
2014-12-20T21:47:21
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,411
h
#ifndef FILEFINDER_H #define FILEFINDER_H #include "iofunctions.h" #include <boost/filesystem.hpp> class FileFinder { public: FileFinder() { } void FindFiles( const std::string & folder , const stringlist & ext) { if ( folder.empty() ) return; std::string mask_folder(folder + "*.*" ); HANDLE hFindFile = INVALID_HANDLE_VALUE; WIN32_FIND_DATAA findData; hFindFile = FindFirstFileA( mask_folder.c_str() , &findData ); if ( hFindFile != INVALID_HANDLE_VALUE ) { do { if ( !strncmp( findData.cFileName, "." , 1 ) || !strncmp( findData.cFileName , ".." , 2 ) ) continue; if ( (findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ) { std::string sub_folder( IO::addFolderName( folder , findData.cFileName ) ); IO::addBackspace( sub_folder ); FindFiles( sub_folder , ext ); } // Get PAHT to Directory if ( ! (findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ) { std::string file_name( findData.cFileName ); auto file_ext = boost::filesystem::extension( file_name ); if ( IO::isPresentInList( ext , file_ext ) ) { file_list_.push_back( IO::make_file_path( folder , file_name ) ); } } //SearchFiles( }while(FindNextFileA(hFindFile, &findData) ); FindClose(hFindFile); } } stringlist getFileNames() const { return file_list_; } private: stringlist file_list_; }; #endif
[ "Lyarvo4ka@hotmail.com" ]
Lyarvo4ka@hotmail.com
09fbfb18b6bcfd3d1aa6c2d1e51c0e40bdcaece3
ad273708d98b1f73b3855cc4317bca2e56456d15
/aws-cpp-sdk-config/include/aws/config/model/GetAggregateDiscoveredResourceCountsResult.h
4e89c2745ad02826f6b5816814b149fca8d58042
[ "MIT", "Apache-2.0", "JSON" ]
permissive
novaquark/aws-sdk-cpp
b390f2e29f86f629f9efcf41c4990169b91f4f47
a0969508545bec9ae2864c9e1e2bb9aff109f90c
refs/heads/master
2022-08-28T18:28:12.742810
2020-05-27T15:46:18
2020-05-27T15:46:18
267,351,721
1
0
Apache-2.0
2020-05-27T15:08:16
2020-05-27T15:08:15
null
UTF-8
C++
false
false
7,754
h
/* * Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ #pragma once #include <aws/config/ConfigService_EXPORTS.h> #include <aws/core/utils/memory/stl/AWSString.h> #include <aws/core/utils/memory/stl/AWSVector.h> #include <aws/config/model/GroupedResourceCount.h> #include <utility> namespace Aws { template<typename RESULT_TYPE> class AmazonWebServiceResult; namespace Utils { namespace Json { class JsonValue; } // namespace Json } // namespace Utils namespace ConfigService { namespace Model { class AWS_CONFIGSERVICE_API GetAggregateDiscoveredResourceCountsResult { public: GetAggregateDiscoveredResourceCountsResult(); GetAggregateDiscoveredResourceCountsResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result); GetAggregateDiscoveredResourceCountsResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result); /** * <p>The total number of resources that are present in an aggregator with the * filters that you provide.</p> */ inline long long GetTotalDiscoveredResources() const{ return m_totalDiscoveredResources; } /** * <p>The total number of resources that are present in an aggregator with the * filters that you provide.</p> */ inline void SetTotalDiscoveredResources(long long value) { m_totalDiscoveredResources = value; } /** * <p>The total number of resources that are present in an aggregator with the * filters that you provide.</p> */ inline GetAggregateDiscoveredResourceCountsResult& WithTotalDiscoveredResources(long long value) { SetTotalDiscoveredResources(value); return *this;} /** * <p>The key passed into the request object. If <code>GroupByKey</code> is not * provided, the result will be empty.</p> */ inline const Aws::String& GetGroupByKey() const{ return m_groupByKey; } /** * <p>The key passed into the request object. If <code>GroupByKey</code> is not * provided, the result will be empty.</p> */ inline void SetGroupByKey(const Aws::String& value) { m_groupByKey = value; } /** * <p>The key passed into the request object. If <code>GroupByKey</code> is not * provided, the result will be empty.</p> */ inline void SetGroupByKey(Aws::String&& value) { m_groupByKey = std::move(value); } /** * <p>The key passed into the request object. If <code>GroupByKey</code> is not * provided, the result will be empty.</p> */ inline void SetGroupByKey(const char* value) { m_groupByKey.assign(value); } /** * <p>The key passed into the request object. If <code>GroupByKey</code> is not * provided, the result will be empty.</p> */ inline GetAggregateDiscoveredResourceCountsResult& WithGroupByKey(const Aws::String& value) { SetGroupByKey(value); return *this;} /** * <p>The key passed into the request object. If <code>GroupByKey</code> is not * provided, the result will be empty.</p> */ inline GetAggregateDiscoveredResourceCountsResult& WithGroupByKey(Aws::String&& value) { SetGroupByKey(std::move(value)); return *this;} /** * <p>The key passed into the request object. If <code>GroupByKey</code> is not * provided, the result will be empty.</p> */ inline GetAggregateDiscoveredResourceCountsResult& WithGroupByKey(const char* value) { SetGroupByKey(value); return *this;} /** * <p>Returns a list of GroupedResourceCount objects.</p> */ inline const Aws::Vector<GroupedResourceCount>& GetGroupedResourceCounts() const{ return m_groupedResourceCounts; } /** * <p>Returns a list of GroupedResourceCount objects.</p> */ inline void SetGroupedResourceCounts(const Aws::Vector<GroupedResourceCount>& value) { m_groupedResourceCounts = value; } /** * <p>Returns a list of GroupedResourceCount objects.</p> */ inline void SetGroupedResourceCounts(Aws::Vector<GroupedResourceCount>&& value) { m_groupedResourceCounts = std::move(value); } /** * <p>Returns a list of GroupedResourceCount objects.</p> */ inline GetAggregateDiscoveredResourceCountsResult& WithGroupedResourceCounts(const Aws::Vector<GroupedResourceCount>& value) { SetGroupedResourceCounts(value); return *this;} /** * <p>Returns a list of GroupedResourceCount objects.</p> */ inline GetAggregateDiscoveredResourceCountsResult& WithGroupedResourceCounts(Aws::Vector<GroupedResourceCount>&& value) { SetGroupedResourceCounts(std::move(value)); return *this;} /** * <p>Returns a list of GroupedResourceCount objects.</p> */ inline GetAggregateDiscoveredResourceCountsResult& AddGroupedResourceCounts(const GroupedResourceCount& value) { m_groupedResourceCounts.push_back(value); return *this; } /** * <p>Returns a list of GroupedResourceCount objects.</p> */ inline GetAggregateDiscoveredResourceCountsResult& AddGroupedResourceCounts(GroupedResourceCount&& value) { m_groupedResourceCounts.push_back(std::move(value)); return *this; } /** * <p>The <code>nextToken</code> string returned on a previous page that you use to * get the next page of results in a paginated response.</p> */ inline const Aws::String& GetNextToken() const{ return m_nextToken; } /** * <p>The <code>nextToken</code> string returned on a previous page that you use to * get the next page of results in a paginated response.</p> */ inline void SetNextToken(const Aws::String& value) { m_nextToken = value; } /** * <p>The <code>nextToken</code> string returned on a previous page that you use to * get the next page of results in a paginated response.</p> */ inline void SetNextToken(Aws::String&& value) { m_nextToken = std::move(value); } /** * <p>The <code>nextToken</code> string returned on a previous page that you use to * get the next page of results in a paginated response.</p> */ inline void SetNextToken(const char* value) { m_nextToken.assign(value); } /** * <p>The <code>nextToken</code> string returned on a previous page that you use to * get the next page of results in a paginated response.</p> */ inline GetAggregateDiscoveredResourceCountsResult& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;} /** * <p>The <code>nextToken</code> string returned on a previous page that you use to * get the next page of results in a paginated response.</p> */ inline GetAggregateDiscoveredResourceCountsResult& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;} /** * <p>The <code>nextToken</code> string returned on a previous page that you use to * get the next page of results in a paginated response.</p> */ inline GetAggregateDiscoveredResourceCountsResult& WithNextToken(const char* value) { SetNextToken(value); return *this;} private: long long m_totalDiscoveredResources; Aws::String m_groupByKey; Aws::Vector<GroupedResourceCount> m_groupedResourceCounts; Aws::String m_nextToken; }; } // namespace Model } // namespace ConfigService } // namespace Aws
[ "aws-sdk-cpp-automation@github.com" ]
aws-sdk-cpp-automation@github.com
fd38fb3cb7e7df83a860bbbf0f35693a2f083442
919e808e641500f5cc11cd144e247031f500d825
/heekscam-read-only/src/Ruler.h
e1eb846a926f13b20a00e95fe874cdcc834e1fb5
[ "MIT" ]
permissive
play113/swer
0deec24ccf668a159e2ec28f3dfecc1a2168f3b3
78764c67885dfacb1fa24e494a20681265f5254c
refs/heads/master
2021-01-10T06:21:32.776648
2015-10-05T13:11:20
2015-10-05T13:11:20
43,684,495
0
1
null
null
null
null
WINDOWS-1252
C++
false
false
2,229
h
// Ruler.h // Copyright (c) 2009, Dan Heeks // This program is released under the BSD license. See the file COPYING for details. #pragma once #include "HeeksObj.h" class HeeksConfig; struct RulerMark{ int pos; // distance from the 0 mark double length; double width; void glCommands(double units); // including text }; class HRuler: public HeeksObj{ // ___________________________________________________________________ // | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| | // | | | | | | | | | | | | | | | // | |cm 1| 2| 3| 4| | | | // | | // | | // ¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬ // int m_gl_list; void GetFourCorners(gp_Pnt *point); void CalculateMarks(std::list<RulerMark> &marks); double GetUnits(); public: gp_Trsf m_trsf; // position and orientation ( no scaling allowed ) bool m_use_view_units; double m_units; // used, if m_use_view_units == false; 1.0 for mm, 25.4 for inches double m_width; // in mm double m_length;// in mm double m_empty_length; // space at each end in mm HRuler(); // HeeksObj's virtual functions int GetType()const{return RulerType;} long GetMarkingMask()const{return MARKING_FILTER_RULER;} void glCommands(bool select, bool marked, bool no_color); void KillGLLists(void); void GetBox(CBox &box); const wxChar* GetTypeString(void)const{return _("Ruler");} HeeksObj *MakeACopy(void)const; void ModifyByMatrix(const double *mat); void GetGripperPositions(std::list<GripData> *list, bool just_for_endof); void GetProperties(std::list<Property *> *list); void GetTools(std::list<Tool*>* t_list, const wxPoint* p); bool GetScaleAboutMatrix(double *m); bool CanBeRemoved(){return false;} bool CanBeCopied(){return false;} void WriteToConfig(HeeksConfig& config); void ReadFromConfig(HeeksConfig& config); };
[ "play113@googlemail.com" ]
play113@googlemail.com
2c8293e2838d4c196e240eccaaad68c1ea2e68d9
ac5eb7df8515fb92071f9e0f64d1cf6467f4042d
/C++/isIsomorphic.cpp
141ed18736f412b8b923bc8ed6ecdf9c062a5fa7
[]
no_license
Litao439420999/LeetCodeAlgorithm
6ea8060d56953bff6c03c95cf6b94901fbfbe395
9aee4fa0ea211d28ff1e5d9b70597421f9562959
refs/heads/master
2023-07-08T06:17:20.310470
2021-08-08T08:12:23
2021-08-08T08:12:23
null
0
0
null
null
null
null
UTF-8
C++
false
false
980
cpp
/** * @File : isIsomorphic.cpp * @Brief : 同构字符串 * @Link : https://leetcode-cn.com/problems/isomorphic-strings/ * @Author : Wei Li * @Date : 2021-07-28 */ #include <iostream> #include <string> #include <vector> class Solution { public: bool isIsomorphic(std::string s, std::string t) { std::vector<int> s_first_index(256, 0), t_first_index(256, 0); for (int i = 0; i < s.length(); ++i) { if (s_first_index[s[i]] != t_first_index[t[i]]) { return false; } s_first_index[s[i]] = t_first_index[t[i]] = i + 1; } return true; } }; // ---------------------------- int main(int argc, char **argv) { std::string s = "paper", t = "title"; Solution solution; bool check_isomorphic = solution.isIsomorphic(s, t); std::cout << "The solution of this problem is " << std::boolalpha << check_isomorphic << std::endl; return 0; }
[ "weili_yzzcq@163.com" ]
weili_yzzcq@163.com
5cee6d29b6092e36b7ccb1d5a985b8704ab79828
d5fb726ae2eb18469da8f97ef89f0bb5038f8471
/bakingdog/basic-algo-lecture-master/basic-algo-lecture-master/0x13/solutions/10816.cpp
c26eed3b48b9e003a9c56400562133d9f4b96d7f
[]
no_license
fpzk5656/studio-code
3fe9b853ca0a79c53503d71647470a19d7c11cd1
d095afda3aaad35d988f8f929e18ff062b4a7a4c
refs/heads/master
2023-08-28T02:12:31.729007
2021-10-31T15:11:19
2021-10-31T15:11:19
349,780,230
0
0
null
null
null
null
UTF-8
C++
false
false
435
cpp
// Authored by : BaaaaaaaaaaarkingDog // Co-authored by : - // http://boj.kr/78ba45c70b3c4128ae11ded0b1015d71 #include <bits/stdc++.h> using namespace std; int a[500005]; int n; int main(void) { ios::sync_with_stdio(0); cin.tie(0); cin >> n; for(int i = 0; i < n; i++) cin >> a[i]; sort(a,a+n); int m; cin >> m; while(m--){ int t; cin >> t; cout << upper_bound(a,a+n,t)-lower_bound(a,a+n,t) << '\n'; } }
[ "fpzk5656@gmail.com" ]
fpzk5656@gmail.com
306290dcfdb35f5c7cbd44a8e7353e0a5f610dcb
acd8fd6566e0cc29cb803a48a153c453dc07b9ee
/design_pattern/command/simple_command_runner.cpp
89a9ce4da5a9fe62df5a398e8997aa83b2bc6933
[]
no_license
yukai2014/program
551650d01a0dc4012013c8d1dae678574587fde0
5417abacfdda2606f0dc35174f846ad7e84f7b99
refs/heads/master
2021-01-19T07:02:37.928616
2017-01-02T07:30:12
2017-01-02T07:30:12
24,222,521
0
0
null
null
null
null
UTF-8
C++
false
false
1,288
cpp
/* * Copyright [2012-2015] DaSE@ECNU * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * simple_command_runner.cpp * * Created on: Sep 1, 2015 * Author: yukai * Email: yukai2014@gmail.com * * Description: * */ #include "./simple_command_runner.h" #include <vector> SimpleCommandRunner::SimpleCommandRunner() { } // vector<SimpleCommand*> SimpleCommandRunner::s_command_collection; void SimpleCommandRunner::Run() { for (auto& command : SimpleCommandRunner::s_command_collection) { command->Execute(); } }
[ "yukai2014@gmail.com" ]
yukai2014@gmail.com
2bdb6e5f3e3e63d051e02b529eea0c03a4c473f1
9ac56ff5b745fdebf34083ac113c577a8b120aa3
/src/materialsystem/stdshaders/volume_clouds_helper.cpp
08f172f57ae73b0cc1f241e7cee877af51f9a61f
[]
no_license
FriskTheFallenHuman/swarm-sdk-template
16e8e29edb9a19ecd1b38ededcc31fb1f6653ae1
a6e6bf7fcbe5b93b5e5fc4ad32944022dae27f90
refs/heads/master
2023-01-13T17:23:32.693199
2020-11-11T00:44:59
2020-11-11T00:44:59
38,081,794
8
3
null
2020-11-11T00:45:00
2015-06-26T00:32:09
C++
WINDOWS-1252
C++
false
false
5,408
cpp
//========= Copyright © 1996-2006, Valve Corporation, All rights reserved. ============// #include "BaseVSShader.h" #include "mathlib/VMatrix.h" #include "volume_clouds_helper.h" #include "convar.h" // Auto generated inc files #include "volume_clouds_vs20.inc" #include "volume_clouds_ps20.inc" #include "volume_clouds_ps20b.inc" // NOTE: This has to be the last file included! #include "tier0/memdbgon.h" void InitParamsVolumeClouds( CBaseVSShader *pShader, IMaterialVar** params, const char *pMaterialName, VolumeCloudsVars_t &info ) { // Set material flags SET_FLAGS2( MATERIAL_VAR2_SUPPORTS_HW_SKINNING ); SET_FLAGS2( MATERIAL_VAR2_NEEDS_TANGENT_SPACES ); SET_FLAGS( MATERIAL_VAR_TRANSLUCENT ); SET_PARAM_FLOAT_IF_NOT_DEFINED( info.m_nTime, 0.0f ); // Set material parameter default values SET_PARAM_FLOAT_IF_NOT_DEFINED( info.m_nRefractAmount, kDefaultRefractAmount ); } void InitVolumeClouds( CBaseVSShader *pShader, IMaterialVar** params, VolumeCloudsVars_t &info ) { // Load textures if ( (info.m_nTexture1 != -1) && params[info.m_nTexture1]->IsDefined() ) { pShader->LoadTexture( info.m_nTexture1 ); } if ( (info.m_nTexture2 != -1) && params[info.m_nTexture2]->IsDefined() ) { pShader->LoadTexture( info.m_nTexture2 ); } if ( (info.m_nTexture3 != -1) && params[info.m_nTexture3]->IsDefined() ) { pShader->LoadTexture( info.m_nTexture3 ); } } void DrawVolumeClouds( CBaseVSShader *pShader, IMaterialVar** params, IShaderDynamicAPI *pShaderAPI, IShaderShadow* pShaderShadow, VolumeCloudsVars_t &info, VertexCompressionType_t vertexCompression ) { SHADOW_STATE { // Set stream format (note that this shader supports compression) unsigned int flags = VERTEX_POSITION | VERTEX_NORMAL | VERTEX_FORMAT_COMPRESSED; int nTexCoordCount = 1; int userDataSize = 0; pShaderShadow->VertexShaderVertexFormat( flags, nTexCoordCount, NULL, userDataSize ); // Vertex Shader DECLARE_STATIC_VERTEX_SHADER( volume_clouds_vs20 ); SET_STATIC_VERTEX_SHADER( volume_clouds_vs20 ); // Pixel Shader if( g_pHardwareConfig->SupportsPixelShaders_2_b() ) { DECLARE_STATIC_PIXEL_SHADER( volume_clouds_ps20b ); SET_STATIC_PIXEL_SHADER( volume_clouds_ps20b ); } else { DECLARE_STATIC_PIXEL_SHADER( volume_clouds_ps20 ); SET_STATIC_PIXEL_SHADER( volume_clouds_ps20 ); } // Textures pShaderShadow->EnableTexture( SHADER_SAMPLER0, true ); pShaderShadow->EnableSRGBRead( SHADER_SAMPLER0, true ); pShaderShadow->EnableTexture( SHADER_SAMPLER1, true ); pShaderShadow->EnableSRGBRead( SHADER_SAMPLER1, true ); pShaderShadow->EnableTexture( SHADER_SAMPLER2, true ); pShaderShadow->EnableSRGBRead( SHADER_SAMPLER2, true ); pShaderShadow->EnableSRGBWrite( true ); // Blending pShader->EnableAlphaBlending( SHADER_BLEND_SRC_ALPHA, SHADER_BLEND_ONE_MINUS_SRC_ALPHA ); pShaderShadow->EnableAlphaWrites( false ); // !!! We need to turn this back on because EnableAlphaBlending() above disables it! //pShaderShadow->EnableDepthWrites( true ); } DYNAMIC_STATE { // Set Vertex Shader Combos DECLARE_DYNAMIC_VERTEX_SHADER( volume_clouds_vs20 ); SET_DYNAMIC_VERTEX_SHADER_COMBO( SKINNING, pShaderAPI->GetCurrentNumBones() > 0 ); SET_DYNAMIC_VERTEX_SHADER_COMBO( COMPRESSED_VERTS, (int)vertexCompression ); SET_DYNAMIC_VERTEX_SHADER( volume_clouds_vs20 ); // Set Vertex Shader Constants // Time float vPackedVsConst1[4] = { 0.0f, 0.0f, 0.0f, 0.0f }; float flTime = IS_PARAM_DEFINED( info.m_nTime ) && params[info.m_nTime]->GetFloatValue() > 0.0f ? params[info.m_nTime]->GetFloatValue() : pShaderAPI->CurrentTime(); float flRotateSpeed = 0.065f; vPackedVsConst1[0] = flTime * flRotateSpeed * 1.0f; vPackedVsConst1[1] = flTime * flRotateSpeed * 2.0f; vPackedVsConst1[2] = flTime * flRotateSpeed * 4.0f; vPackedVsConst1[0] -= (float)( (int)( vPackedVsConst1[0] / ( 2.0f * 3.14159f ) ) ) * 2.0f * 3.14159f; vPackedVsConst1[1] -= (float)( (int)( vPackedVsConst1[1] / ( 2.0f * 3.14159f ) ) ) * 2.0f * 3.14159f; vPackedVsConst1[2] -= (float)( (int)( vPackedVsConst1[2] / ( 2.0f * 3.14159f ) ) ) * 2.0f * 3.14159f; pShaderAPI->SetVertexShaderConstant( VERTEX_SHADER_SHADER_SPECIFIC_CONST_0, vPackedVsConst1, 1 ); // Set Pixel Shader Combos if ( g_pHardwareConfig->SupportsPixelShaders_2_b() ) { DECLARE_DYNAMIC_PIXEL_SHADER( volume_clouds_ps20b ); SET_DYNAMIC_PIXEL_SHADER( volume_clouds_ps20b ); } else { DECLARE_DYNAMIC_PIXEL_SHADER( volume_clouds_ps20 ); SET_DYNAMIC_PIXEL_SHADER( volume_clouds_ps20 ); } // Bind textures pShader->BindTexture( SHADER_SAMPLER0, info.m_nTexture1 ); pShader->BindTexture( SHADER_SAMPLER1, info.m_nTexture2 ); pShader->BindTexture( SHADER_SAMPLER2, info.m_nTexture3 ); // Set Pixel Shader Constants float vEyePos[4] = { 0.0f, 0.0f, 0.0f, 0.0f }; pShaderAPI->GetWorldSpaceCameraPosition( vEyePos ); pShaderAPI->SetPixelShaderConstant( 5, vEyePos, 1 ); float vPackedConst6[4] = { 0.0f, 0.0f, 0.0f, 0.0f }; vPackedConst6[0] = IS_PARAM_DEFINED( info.m_nRefractAmount ) ? params[info.m_nRefractAmount]->GetFloatValue() : kDefaultRefractAmount; vPackedConst6[1] = vPackedVsConst1[0]; // Time % 1000 pShaderAPI->SetPixelShaderConstant( 6, vPackedConst6, 1 ); } pShader->Draw(); }
[ "kosire.dk@gmail.com" ]
kosire.dk@gmail.com
e523533e0f42d1512b78be5936b21aa6b5cf5ee9
8a1faff626e99e3454b3679e59093d37f3e44eba
/C++/diTauMLMassInterface.cc
d89cb28acb0271f4a0e6500601a7f7286cf7b6f7
[ "MIT" ]
permissive
lucastorterotot/DiTau_ML_mass
a6625b647bd66f015a283067ac17a01ab5098373
7870a9184a5b6595b3985ad78f114a0e8a9023cc
refs/heads/main
2023-06-10T19:38:53.049959
2021-06-30T09:22:23
2021-06-30T09:22:23
351,710,842
0
0
null
null
null
null
UTF-8
C++
false
false
4,283
cc
/*### --- C++ interface to DiTau_ML_mass --- https://github.com/lucastorterotot/DiTau_ML_mass --- Davide Zuolo (University and INFN Milano - Bicocca) --- March 2021 ###*/ #include "../interface/diTauMLMassInterface.h" namespace ditauMLMass { diTauMLMass::diTauMLMass(const std::string & model) { nn_desc.graph.reset(tensorflow::loadMetaGraph(model)); nn_desc.session = tensorflow::createSession(nn_desc.graph.get(), model); nn_desc.input_layer = "serving_default_dense_1_input:0"; nn_desc.output_layer = "StatefulPartitionedCall:0"; } float diTauMLMass::GetScore(const double tau1_pt_reco, const double tau1_eta_reco, const double tau1_phi_reco, const double tau2_pt_reco, const double tau2_eta_reco, const double tau2_phi_reco, const double jet1_pt_reco, const double jet1_eta_reco, const double jet1_phi_reco, const double jet2_pt_reco, const double jet2_eta_reco, const double jet2_phi_reco, const double remaining_jets_pt_reco, const double remaining_jets_eta_reco, const double remaining_jets_phi_reco, const int remaining_jets_N_reco, const double MET_pt_reco, const double MET_phi_reco, const double MET_covXX_reco, const double MET_covXY_reco, const double MET_covYY_reco, const double mT1_reco, const double mT2_reco, const double mTtt_reco, const double mTtot_reco, const int PU_npvsGood_reco, const int N_neutrinos_reco ) { tensorflow::Tensor x(tensorflow::DT_FLOAT, tensorflow::TensorShape{1, diTauMLMass::n_variables}); x.flat<float>().setZero(); x.tensor<float, 2>()(0, InputVars::vars::tau1_pt_reco) = tau1_pt_reco; x.tensor<float, 2>()(0, InputVars::vars::tau1_eta_reco) = tau1_eta_reco; x.tensor<float, 2>()(0, InputVars::vars::tau1_phi_reco) = tau1_phi_reco; x.tensor<float, 2>()(0, InputVars::vars::tau2_pt_reco) = tau2_pt_reco; x.tensor<float, 2>()(0, InputVars::vars::tau2_eta_reco) = tau2_eta_reco; x.tensor<float, 2>()(0, InputVars::vars::tau2_phi_reco) = tau2_phi_reco; x.tensor<float, 2>()(0, InputVars::vars::jet1_pt_reco) = jet1_pt_reco; x.tensor<float, 2>()(0, InputVars::vars::jet1_eta_reco) = jet1_eta_reco; x.tensor<float, 2>()(0, InputVars::vars::jet1_phi_reco) = jet1_phi_reco; x.tensor<float, 2>()(0, InputVars::vars::jet2_pt_reco) = jet2_pt_reco; x.tensor<float, 2>()(0, InputVars::vars::jet2_eta_reco) = jet2_eta_reco; x.tensor<float, 2>()(0, InputVars::vars::jet2_phi_reco) = jet2_phi_reco; x.tensor<float, 2>()(0, InputVars::vars::remaining_jets_pt_reco) = remaining_jets_pt_reco; x.tensor<float, 2>()(0, InputVars::vars::remaining_jets_eta_reco) = remaining_jets_eta_reco; x.tensor<float, 2>()(0, InputVars::vars::remaining_jets_phi_reco) = remaining_jets_phi_reco; x.tensor<float, 2>()(0, InputVars::vars::remaining_jets_N_reco) = remaining_jets_N_reco; x.tensor<float, 2>()(0, InputVars::vars::MET_pt_reco) = MET_pt_reco; x.tensor<float, 2>()(0, InputVars::vars::MET_phi_reco) = MET_phi_reco; x.tensor<float, 2>()(0, InputVars::vars::MET_covXX_reco) = MET_covXX_reco; x.tensor<float, 2>()(0, InputVars::vars::MET_covXY_reco) = MET_covXY_reco; x.tensor<float, 2>()(0, InputVars::vars::MET_covYY_reco) = MET_covYY_reco; x.tensor<float, 2>()(0, InputVars::vars::mT1_reco) = mT1_reco; x.tensor<float, 2>()(0, InputVars::vars::mT2_reco) = mT2_reco; x.tensor<float, 2>()(0, InputVars::vars::mTtt_reco) = mTtt_reco; x.tensor<float, 2>()(0, InputVars::vars::mTtot_reco) = mTtot_reco; x.tensor<float, 2>()(0, InputVars::vars::PU_npvsGood_reco) = PU_npvsGood_reco; x.tensor<float, 2>()(0, InputVars::vars::N_neutrinos_reco) = N_neutrinos_reco; std::vector<tensorflow::Tensor> pred_vec; tensorflow::run(nn_desc.session, { { nn_desc.input_layer, x } },{ nn_desc.output_layer }, &pred_vec); return pred_vec.at(0).matrix<float>()(0); } diTauMLMass::~diTauMLMass() { tensorflow::closeSession(nn_desc.session); } }// namespace ditauMLMass
[ "lucas.torterotot@gmail.com" ]
lucas.torterotot@gmail.com
e30207388f7e5ac5a8b92a1792881e892ed85871
05138458c40bf1ee37c7f9e15ba64f0176107e47
/src/dist/distributor.cpp
243917b77f572eecaa9fa6282fb717ec194b209c
[ "BSD-3-Clause" ]
permissive
yvdriess/icnc
34a3912595dce291922a4dafc6d814add376915c
e511deb9ff2c76079b8809e887fd67055207b6b4
refs/heads/master
2020-12-31T01:48:10.167649
2014-09-08T16:14:17
2014-09-08T16:14:17
23,796,622
0
0
null
null
null
null
UTF-8
C++
false
false
16,845
cpp
/* ******************************************************************************* * Copyright (c) 2007-2014, Intel Corporation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of Intel Corporation nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ********************************************************************************/ /* see distributor.h */ #include <cnc/internal/dist/distributor.h> #include <cnc/internal/dist/distributable_context.h> #include <cnc/internal/dist/communicator.h> #include <cnc/internal/dist/factory.h> #include <cnc/serializer.h> #include <iostream> namespace CnC { namespace Internal { distributor * distributor::theDistributor = NULL; communicator * distributor::m_communicator = NULL; distributor::distributor() : m_distContexts(), m_nextGId(), m_state( distributor::DIST_OFF ), m_sync(), m_flushCount( 0 ), m_nMsgsRecvd(), m_distEnv( false ) { } // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% void distributor::init() { theDistributor = new distributor(); theDistributor->m_state = DIST_INITING; } // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% void distributor::fini() { delete theDistributor; theDistributor = NULL; } // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /// start distributed system void distributor::start( int flag, bool dist_env ) { CNC_ASSERT( m_communicator ); theDistributor->m_nextGId = 0; theDistributor->m_nMsgsRecvd = 0; theDistributor->m_state = DIST_ON; theDistributor->m_distEnv = dist_env; theDistributor->m_communicator->init( 0, flag ); } // FIXME more than one communicator // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /// stop distributed system void distributor::stop() { if( active() && theDistributor->m_communicator ) { theDistributor->m_communicator->fini(); // theDistributor->m_communicator = NULL; } theDistributor->m_state = DIST_SUSPENDED; } // FIXME more than one communicator // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% static const char DIS_CTXT = 0; static const char UN_CTXT = 1; static const char PING = 3; static const char PONG = 4; // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% int distributor::distribute( distributable_context * dctxt ) { if( !active() || theDistributor->m_communicator == NULL || !dctxt->distributed() || ( remote() && !theDistributor->distributed_env() ) ) { // in a hierarchical network, we might have to do something here return dctxt->gid(); } int _gid = theDistributor->m_nextGId++; my_map::accessor _accr; theDistributor->m_distContexts[0].insert( _accr, _gid ); _accr->second = dctxt; dctxt->set_gid( _gid ); _accr.release(); if( theDistributor->distributed_env() ) { dctxt->fini_dist_ready(); return _gid; } // the host needs to actually send context to remote processes serializer * _serlzr = new_serializer( NULL ); int _tid = dctxt->factory_id(); (*_serlzr) & DIS_CTXT & _tid & _gid & (*dctxt); bcast_msg( _serlzr ); dctxt->fini_dist_ready(); return _gid; } // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /// mark given context as deleted /// currently limited to be called on the host only /// clones on other processes will be deleted void distributor::undistribute( distributable_context * dctxt ) { if( !active() || theDistributor->m_communicator == NULL || !dctxt->distributed() || remote() || theDistributor->distributed_env() ) { // in a hierarchical network, we might have to do something here return; } // the host needs to actually inform remote processes serializer * _serlzr = new_serializer( NULL ); int _tid = dctxt->factory_id(); int _gid = dctxt->gid(); (*_serlzr) & UN_CTXT & _tid & _gid; bcast_msg( _serlzr ); theDistributor->m_distContexts[0].erase( dctxt->gid() ); } // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /// distributable_contexts send their messages through the global distributor void distributor::send_msg( serializer * serlzr, int rcver ) { BufferAccess::finalizePack( *serlzr ); // FIXME support for more than one communicator theDistributor->m_communicator->send_msg( serlzr, rcver ); // ++theDistributor->m_nMsgsRecvd; } // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /// distributable_contexts send their messages through the global distributor void distributor::bcast_msg( serializer * serlzr ) { BufferAccess::finalizePack( *serlzr ); // FIXME support for more than one communicator theDistributor->m_communicator->bcast_msg( serlzr ); // ++theDistributor->m_nMsgsRecvd; } // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /// distributable_contexts send their messages through the global distributor bool distributor::bcast_msg( serializer * serlzr, const int * rcvers, int nrecvrs ) { BufferAccess::finalizePack( *serlzr ); // FIXME support for more than one communicator bool _res = theDistributor->m_communicator->bcast_msg( serlzr, rcvers, nrecvrs ); // ++theDistributor->m_nMsgsRecvd; return _res; } // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /// any communicator calls this for incoming messages void distributor::recv_msg( serializer * serlzr , int pid ) { BufferAccess::initUnpack( *serlzr ); int _dctxtId; (*serlzr) & _dctxtId; if( _dctxtId == SELF ) { char _action; (*serlzr) & _action; switch( _action ) { case PING : { // now send pong to all other clients but not the host CNC_ASSERT( myPid() ); // must not be root! serializer * _serlzr = new_serializer( NULL ); // int _pid = myPid(); (*_serlzr) & PONG; // & _pid; int _n = numProcs(); if( _n == 2 ) { // let's trick the case-branch: no break for this if-branch theDistributor->m_flushCount = 1; } else { scalable_vector< int > _rcvers; _rcvers.reserve( _n - 2 ); for( int i = 1; i < _n; ++i ) { // not to the host yet if( i != myPid() ) { _rcvers.push_back( i ); } } // wait until send-queue is empty if( has_pending_messages() ) {++theDistributor->m_nMsgsRecvd;} // now issue send bcast_msg( _serlzr, &_rcvers.front(), _rcvers.size() ); // we expect pong from all other clients; not the host if( theDistributor->m_flushCount == 2 - _n ) { // we had all the pongs before the ping! // let's trick the case-branch: no break for this if-branch theDistributor->m_flushCount = 1; } else { theDistributor->m_flushCount += _n - 2; break; } } } case PONG : { if( myPid() ) { // reduce expected pong count; if hits 0, send pong back to host if( --theDistributor->m_flushCount == 0 ) { serializer * _serlzr = new_serializer( NULL ); // wait until send-queue is empty if( has_pending_messages() ) {++theDistributor->m_nMsgsRecvd;} int _nMsgs = theDistributor->m_nMsgsRecvd.fetch_and_store( 0 ); // int _pid = myPid(); (*_serlzr) & PONG & _nMsgs; // & _pid; send_msg( _serlzr, 0 ); } } else { // push 1 pong on queue int _nMsgs; (*serlzr) & _nMsgs; theDistributor->m_nMsgsRecvd += _nMsgs; // not as clean as it could be, but efficient theDistributor->m_sync.push( 0 ); } break; } default : { ++theDistributor->m_nMsgsRecvd; int _typeId; (*serlzr) & _typeId & _dctxtId; // message for distributor? Distribute or undistribute contexts my_map::accessor _accr; bool _inserted = theDistributor->m_distContexts[pid].insert( _accr, _dctxtId ); // if the context is allready there, remove it. if( ! _inserted ) { CNC_ASSERT( _action == UN_CTXT ); distributable_context * _dctxt = _accr->second; CNC_ASSERT( _accr->second != NULL ); delete _dctxt; // on the host, the user is deleting the context theDistributor->m_distContexts[pid].erase( _accr ); return; } CNC_ASSERT( _action == DIS_CTXT ); creatable * _crtbl = factory::create( _typeId ); CNC_ASSERT( dynamic_cast< distributable_context * >( _crtbl ) ); distributable_context * _dctxt = static_cast< distributable_context * >( _crtbl ); _dctxt->set_gid( _dctxtId ); _accr->second = _dctxt; (*serlzr) & (*_dctxt); _dctxt->fini_dist_ready(); } } } else { ++theDistributor->m_nMsgsRecvd; my_map::const_accessor _accr; bool _inTable = theDistributor->m_distContexts[pid].find( _accr, _dctxtId ); CNC_ASSERT_MSG( _inTable, "Received message for not (yet) existing context\n" ); distributable_context * _dctxt = _accr->second; _accr.release(); _dctxt->recv_msg( serlzr ); } } // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /// currently supported only when called on Host /// send ping to all clients and wait for n-1 pongs to arrive. /// When receiving a ping, client sends pong to all other clients (n-2). /// When client received last pong (n-2) it sends its pong to host. int distributor::flush() { // send all clients ping and expect a pong back // upon receiving ping, clients sends pong to all processes serializer * _serlzr = new_serializer( NULL ); CNC_ASSERT( myPid() == 0 ); // int _pid = myPid(); CNC_ASSERT( theDistributor->m_sync.size() == 0 ); (*_serlzr) & PING; // & _pid; bcast_msg( _serlzr ); // pongs are sent within recv_msg int _n = numProcs() - 1; int _tmp; // wait for all pongs to arrive for( int i = 0; i < _n; ++i ) { theDistributor->m_sync.pop( _tmp ); } int _res = theDistributor->m_nMsgsRecvd.fetch_and_store( 0 ); //_ret; //std::cerr << "\t." << _res << std::endl << std::flush; // std::cerr << ".\n" << std::flush; return _res;// - (2*_n + 1); } // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /// distributable_contexts must get serializer through the distributor /// when done, serializer must be freed by caller using "delete". serializer * distributor::new_serializer( const distributable_context * dctxt ) { // ++theDistributor->m_nMsgsRecvd; serializer * _serlzr = new serializer( false, true ); _serlzr->set_mode_pack(); int _dctxtId = dctxt ? dctxt->gid() : SELF; (*_serlzr) & _dctxtId; return _serlzr; } } // namespace Internal } // namespace CnC
[ "frank.schlimbach@intel.com" ]
frank.schlimbach@intel.com
ec786ab0c14c876c2fa270ca0bc3ea1b78267755
b090cb9bc30ac595675d8aa253fde95aef2ce5ea
/trunk/src/c/shared/Numerics/recast.h
82f00c20c8353e60e653d21f444b69fe52e4815e
[ "BSD-3-Clause", "BSD-2-Clause" ]
permissive
eyhl/issm
5ae1500715c258d7988e2ef344c5c1fd15be55f7
1013e74c28ed663ebb8c9d398d9be0964d002667
refs/heads/master
2022-01-05T14:31:23.235538
2019-01-15T13:13:08
2019-01-15T13:13:08
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,189
h
/* * recast.h * * Created on: Jun 26, 2012 * Author: utke */ #ifndef _RECAST_H_ #define _RECAST_H_ #ifdef HAVE_CONFIG_H #include <config.h> #else #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!" #endif #if !defined(_HAVE_ADOLC_) || defined(_WRAPPERS_) template<class To, class From> To reCast(const From& from) { return (To)from; } #else #include "./types.h" template<class To, class From> struct ForPartialSpecialization { static To reCast(const From& from ) { return (To) from;} }; template<class To, class From> To reCast(const From& from) { return ForPartialSpecialization<To,From>::reCast(from); } /** * partial specialization */ template<class To> struct ForPartialSpecialization<To,adouble> { static To reCast(const adouble& from ) { return (To) (from.getValue());} }; #endif /*Morlighem's change: we do not want dynamic_casts because of performance * issue, so for now, we just use C-like cast*/ template<class To,class From> To xDynamicCast(const From& from) { /*C-like cast (fast but not safe)*/ return (To) from; /*C++ dynamic_cast, poor performance but safer*/ //return dynamic_cast<To>(from); } #endif
[ "cummings.evan@gmail.com" ]
cummings.evan@gmail.com
3e56ef167a53709e2fd5124e5e806acdf4f4350c
c3de57676ebc2c4f6d0849347798534f85ab9a72
/OptimizationLib/src/FunctionConstraints.cpp
b06f2a711942e19374d7da60de81e03f4159f63e
[]
no_license
plusminus34/Interactive_thin_shells_Bachelor_thesis
0662f6d88d76d8d49b2b6066bf1d2b0fc258f01e
85f034a476eeab8d485f19a6ea3208498061a4da
refs/heads/main
2023-03-10T15:15:53.666726
2021-02-24T08:01:25
2021-02-24T08:01:25
341,820,202
0
1
null
null
null
null
UTF-8
C++
false
false
7,460
cpp
#include <OptimizationLib/FunctionConstraints.h> #include <OptimizationLib/ooqpei_assert_macros.hpp> #include <iostream> #include <Utils/Utils.h> FunctionConstraints::FunctionConstraints() { } FunctionConstraints::~FunctionConstraints() { } const dVector& FunctionConstraints::getEqualityConstraintsTargetValues() { return b; } const dVector& FunctionConstraints::getEqualityConstraintValues(const dVector& p) { return eqConstraintVals; } void FunctionConstraints::addEqualityConstraintsJacobianEntriesTo(DynamicArray<MTriplet>& jacobianEntries, const dVector& p) { addEstimatedEqualityConstraintsJacobianEntriesTo(jacobianEntries, p); } void FunctionConstraints::addInequalityConstraintsJacobianEntriesTo(DynamicArray<MTriplet>& jacobianEntries, const dVector& p) { addEstimatedInequalityConstraintsJacobianEntriesTo(jacobianEntries, p); } const dVector& FunctionConstraints::getInequalityConstraintsMinValues() { return d; } const dVector& FunctionConstraints::getInequalityConstraintsMaxValues() { return f; } const dVector& FunctionConstraints::getInequalityConstraintValues(const dVector& p) { return ineqConstraintVals; } const dVector& FunctionConstraints::getBoundConstraintsMinValues() { return l; } const dVector& FunctionConstraints::getBoundConstraintsMaxValues() { return u; } int FunctionConstraints::getEqualityConstraintCount() { return (int)getEqualityConstraintsTargetValues().size(); } int FunctionConstraints::getInequalityConstraintCount() { return (int)getInequalityConstraintsMinValues().size(); } void FunctionConstraints::addEstimatedEqualityConstraintsJacobianEntriesTo(DynamicArray<MTriplet>& jacobianEntries, const dVector& params) { dVector pSet = params; int nConstraints = getEqualityConstraintCount(); int p = (int)pSet.size(); //the jacobian should have dimensions nConstraints x p if (nConstraints > 0) { double dp = 10e-6; dVector C_P(nConstraints), C_M(nConstraints), J_i_col(nConstraints); //this is a very slow method that evaluates the jacobian of the objective function through FD... for (int i = 0; i<p; i++) { double tmpVal = pSet(i); pSet(i) = tmpVal + dp; C_P = getEqualityConstraintValues(pSet); pSet(i) = tmpVal - dp; C_M = getEqualityConstraintValues(pSet); //now reset the ith param value pSet(i) = tmpVal; J_i_col = (C_P - C_M) / (2.0 * dp); //each vector is a column vector of the hessian, so copy it in place... for (int j = 0;j<nConstraints;j++) if (!IS_ZERO(J_i_col(j))) jacobianEntries.push_back(MTriplet(j, i, J_i_col[j])); } } } void FunctionConstraints::addEstimatedInequalityConstraintsJacobianEntriesTo(DynamicArray<MTriplet>& jacobianEntries, const dVector& params) { dVector pSet = params; int nConstraints = getInequalityConstraintCount(); int p = (int)pSet.size(); //the jacobian should have dimensions nConstraints x p if (nConstraints > 0) { double dp = 10e-6; dVector C_P(nConstraints), C_M(nConstraints), J_i_col(nConstraints); //this is a very slow method that evaluates the jacobian of the objective function through FD... for (int i = 0;i<p;i++) { double tmpVal = pSet(i); pSet(i) = tmpVal + dp; C_P = getInequalityConstraintValues(pSet); pSet(i) = tmpVal - dp; C_M = getInequalityConstraintValues(pSet); //now reset the ith param value pSet(i) = tmpVal; J_i_col = 1.0 / (2.0*dp)*C_P + -1.0 / (2.0*dp)*C_M; //each vector is a column vector of the hessian, so copy it in place... for (int j = 0;j<nConstraints;j++) if (!IS_ZERO(J_i_col(j))) jacobianEntries.push_back(MTriplet(j, i, J_i_col[j])); } } } void FunctionConstraints::testJacobiansWithFD(const dVector& p) { DynamicArray<MTriplet> jacobianEntries; SparseMatrix FDJacobian; addEstimatedEqualityConstraintsJacobianEntriesTo(jacobianEntries, p); resize(FDJacobian, getEqualityConstraintCount(), p.size()); FDJacobian.setFromTriplets(jacobianEntries.begin(), jacobianEntries.end()); jacobianEntries.clear(); SparseMatrix analyticJacobian; addEqualityConstraintsJacobianEntriesTo(jacobianEntries, p); resize(analyticJacobian, getEqualityConstraintCount(), p.size()); analyticJacobian.setFromTriplets(jacobianEntries.begin(), jacobianEntries.end()); jacobianEntries.clear(); Logger::logPrint("Function Constraints: testing equality constraints jacobian...\n"); for (int i = 0;i<FDJacobian.rows();i++) { for (int j = 0;j<p.size();j++) { double err = FDJacobian.coeff(i, j) - analyticJacobian.coeff(i, j); if (fabs(err) > 0.001) Logger::logPrint("Mismatch element %d,%d: Analytic val: %lf, FD val: %lf. Error: %lf\n", i, j, analyticJacobian.coeff(i, j), FDJacobian.coeff(i, j), err); } } addEstimatedInequalityConstraintsJacobianEntriesTo(jacobianEntries, p); resize(FDJacobian, getInequalityConstraintCount(), p.size()); FDJacobian.setFromTriplets(jacobianEntries.begin(), jacobianEntries.end()); jacobianEntries.clear(); addInequalityConstraintsJacobianEntriesTo(jacobianEntries, p); resize(analyticJacobian, getInequalityConstraintCount(), p.size()); analyticJacobian.setFromTriplets(jacobianEntries.begin(), jacobianEntries.end()); jacobianEntries.clear(); Logger::logPrint("Function Constraints: testing inequality constraints jacobian...\n"); for (int i = 0;i<FDJacobian.rows();i++) { for (int j = 0;j<p.size();j++) { double err = FDJacobian.coeff(i, j) - analyticJacobian.coeff(i, j); if (fabs(err) > 0.001) Logger::logPrint("Mismatch element %d,%d: Analytic val: %lf, FD val: %lf. Error: %lf\n", i, j, analyticJacobian.coeff(i, j), FDJacobian.coeff(i, j), err); } } } void FunctionConstraints::printConstraintErrors(const dVector& p, double eqTol, double iqTol){ dVector de = getEqualityConstraintValues(p); if (de.size() > 0) { dVector dtargets = getEqualityConstraintsTargetValues(); dVector::Index maxIndex; double maxError = (de - dtargets).cwiseAbs().maxCoeff(&maxIndex); if (maxError > eqTol) { Logger::logPrint("-----> Max equality constraint error: %10.10lf at index %d\n", maxError, maxIndex); } else { Logger::logPrint(" Equality constraints are within the tolerance.\n"); } } de = getInequalityConstraintValues(p); if (de.size() > 0) { dVector::Index maxIndexMin; dVector::Index maxIndexMax; double maxErrorMin = (-de + getInequalityConstraintsMinValues()).maxCoeff(&maxIndexMin); double maxErrorMax = (de - getInequalityConstraintsMaxValues()).maxCoeff(&maxIndexMax); dVector::Index maxIndex; double maxError = 0; if (maxErrorMin > maxErrorMax) { maxError = maxErrorMin; maxIndex = maxIndexMin; } else { maxError = maxErrorMax; maxIndex = maxIndexMax; } if (maxError > iqTol) { Logger::logPrint("------> Max inequality constraint error: %10.10lf at index %d (%lf < %lf < %lf) \n", maxError, maxIndex, getInequalityConstraintsMinValues()(maxIndex),de(maxIndex), getInequalityConstraintsMaxValues()(maxIndex)); } else { Logger::logPrint(" Inequality constraints are within the tolerance.\n"); } } dVector minVals = getBoundConstraintsMinValues(); dVector maxVals = getBoundConstraintsMaxValues(); if (minVals.size() == maxVals.size() && minVals.size() == p.size()) { for (int i = 0;i<p.size();i++) { if (minVals(i) != maxVals(i) && (minVals(i)>p(i) || p[i]>maxVals(i))) { Logger::logPrint("-------> Error: Bound %d: %lf < %lf < %lf\n", i, minVals(i), p(i), maxVals(i)); } } } Logger::logPrint("\n"); }
[ "moritzgeilinger@gmail.com" ]
moritzgeilinger@gmail.com
0df8463819ef127be5271856e03ff679a18a9ee6
cf3302a478551167d14c577be171fe0c1b4a3507
/src/cpp/activemq/activemq-cpp-3.2.5/src/test/activemq/wireformat/openwire/marshal/v4/ConsumerIdMarshallerTest.cpp
afc73e1dc1894730addca510d6c51b3e003a664f
[ "Apache-2.0" ]
permissive
WilliamDrewAeroNomos/muthur
7babb320ed3bfb6ed7905a1a943e3d35aa03aedc
0c66c78af245ef3b06b92172e0df62eb54b3fb84
refs/heads/master
2016-09-05T11:15:50.083267
2015-07-01T15:49:56
2015-07-01T15:49:56
38,366,076
0
0
null
null
null
null
UTF-8
C++
false
false
5,710
cpp
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <activemq/wireformat/openwire/marshal/v4/ConsumerIdMarshallerTest.h> #include <activemq/wireformat/openwire/marshal/v4/ConsumerIdMarshaller.h> #include <activemq/commands/ConsumerId.h> #include <activemq/wireformat/openwire/OpenWireFormat.h> #include <activemq/commands/DataStructure.h> #include <activemq/commands/MessageId.h> #include <activemq/commands/ProducerId.h> #include <activemq/wireformat/openwire/utils/BooleanStream.h> #include <decaf/io/DataInputStream.h> #include <decaf/io/DataOutputStream.h> #include <decaf/io/IOException.h> #include <decaf/io/ByteArrayOutputStream.h> #include <decaf/io/ByteArrayInputStream.h> #include <decaf/util/Properties.h> #include <decaf/lang/Pointer.h> // // NOTE!: This file is autogenerated - do not modify! // if you need to make a change, please see the Java Classes in the // activemq-core module // using namespace std; using namespace activemq; using namespace activemq::util; using namespace activemq::exceptions; using namespace activemq::commands; using namespace activemq::wireformat; using namespace activemq::wireformat::openwire; using namespace activemq::wireformat::openwire::marshal; using namespace activemq::wireformat::openwire::utils; using namespace activemq::wireformat::openwire::marshal::v4; using namespace decaf::io; using namespace decaf::lang; using namespace decaf::util; /////////////////////////////////////////////////////////////////////////////// void ConsumerIdMarshallerTest::test() { ConsumerIdMarshaller myMarshaller; ConsumerId myCommand; ConsumerId* myCommand2; CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() ); myCommand2 = dynamic_cast<ConsumerId*>( myMarshaller.createObject() ); CPPUNIT_ASSERT( myCommand2 != NULL ); delete myCommand2; } /////////////////////////////////////////////////////////////////////////////// void ConsumerIdMarshallerTest::testLooseMarshal() { ConsumerIdMarshaller marshaller; Properties props; OpenWireFormat openWireFormat( props ); // Configure for this test. openWireFormat.setVersion( 4 ); openWireFormat.setTightEncodingEnabled( false ); ConsumerId outCommand; ConsumerId inCommand; try { // Marshal the dataStructure to a byte array. ByteArrayOutputStream baos; DataOutputStream dataOut( &baos ); dataOut.writeByte( outCommand.getDataStructureType() ); marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut ); // Now read it back in and make sure it's all right. std::pair<const unsigned char*, int> array = baos.toByteArray(); ByteArrayInputStream bais( array.first, array.second, true ); DataInputStream dataIn( &bais ); unsigned char dataType = dataIn.readByte(); CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() ); marshaller.looseUnmarshal( &openWireFormat, &inCommand, &dataIn ); CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true ); } catch( ActiveMQException& e ) { e.printStackTrace(); CPPUNIT_ASSERT( false ); } catch( ... ) { CPPUNIT_ASSERT( false ); } } /////////////////////////////////////////////////////////////////////////////// void ConsumerIdMarshallerTest::testTightMarshal() { ConsumerIdMarshaller marshaller; Properties props; OpenWireFormat openWireFormat( props ); // Configure for this test. openWireFormat.setVersion( 4 ); openWireFormat.setTightEncodingEnabled( true ); ConsumerId outCommand; ConsumerId inCommand; try { // Marshal the dataStructure to a byte array. ByteArrayOutputStream baos; DataOutputStream dataOut( &baos ); // Phase 1 - count the size int size = 1; BooleanStream bs; size += marshaller.tightMarshal1( &openWireFormat, &outCommand, &bs ); size += bs.marshalledSize(); // Phase 2 - marshal dataOut.writeByte( outCommand.getDataStructureType() ); bs.marshal( &dataOut ); marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs ); // Now read it back in and make sure it's all right. std::pair<const unsigned char*, int> array = baos.toByteArray(); ByteArrayInputStream bais( array.first, array.second, true ); DataInputStream dataIn( &bais ); unsigned char dataType = dataIn.readByte(); CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() ); bs.clear(); bs.unmarshal( &dataIn ); marshaller.tightUnmarshal( &openWireFormat, &inCommand, &dataIn, &bs ); CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true ); } catch( ActiveMQException& e ) { e.printStackTrace(); CPPUNIT_ASSERT( false ); } catch( ... ) { CPPUNIT_ASSERT( false ); } }
[ "wdrew@aeronomos.com" ]
wdrew@aeronomos.com
f130c14d4a1bccacb3f7f80de27c550ba89c291b
c2d14464a74da63387b70826a79a45429b0a5ed9
/energy.hpp
b22dc0c7db4c5466daf1550aebb0ff41e5c10a64
[]
no_license
tkphd/pfhub-bm6-cahn-hilliard-poisson
afa7f9a174b1bbcdb70c424258161679ef42b30f
39314cd1ac40a4dd34462ae73c192649f2367c03
refs/heads/main
2021-07-11T15:57:05.391386
2018-10-15T23:37:35
2018-10-15T23:37:35
150,015,363
1
0
null
null
null
null
UTF-8
C++
false
false
2,699
hpp
// energy.hpp // Energy functions for PFHub Benchmark 6 v2 // Questions/comments to trevor.keller@nist.gov (Trevor Keller) #ifndef CAHNHILLIARD_ENERGY #define CAHNHILLIARD_ENERGY #include<cmath> #define cid 0 #define uid 1 #define pid 2 // Composition parameters const double w = 5.00; // well height const double Ca = 0.30; // alpha composition const double Cb = 0.70; // beta composition const double Cs = 0.50; // system composition const double Cf = 0.04; // fluctuation magnitude // Electrostatic parameters const double k = 0.3; // charge-neutralization factor const double epsilon = 20.; // permittivity const double pA = 2.e-4; // external field coefficients const double pB =-1.e-2; const double pC = 2.e-2; // Physical parameters const double kappa = 2.0; const double M0 = 10.; // Gauss-Seidel parameters const double tolerance = 2.5e-9; // threshold residual ||b - Ax||₂ required to end iteration const unsigned int residual_step = 1000; // number of iterations between residual computations const unsigned int max_iter = 100000; // don't let the solver stagnate const double omega = 1.2; // relaxation parameter (default is 1.2): // omega = 1.0 is stock Gauss-Seidel, // omega = 1.2 is successive over-relaxation. // Energy equations double cheminit(const double& x, const double& y) { // Equation 12 return Cs + Cf * ( std::cos(0.200 * x) * std::cos(0.110 * y) + std::pow(std::cos(0.130 * x) * std::cos(0.087 * y), 2.0) + std::cos(0.025 * x - 0.150 * y) * std::cos(0.070 * x - 0.020 * y)); } template<typename T> double chemenergy(const T& C) { // Equation 2 const double A = C - Ca; const double B = Cb - C; return w * A*A * B*B; } double pExt(const double& xx, const double& yy) { return pA * xx * yy + pB * xx + pC * yy; } template<typename T> double elecenergy(const T& C, const T& C0, const T& P, const double& xx, const double& yy) { // Equation 3 const double rhoTot = k * (C - C0); return 0.5 * rhoTot * P + rhoTot * pExt(xx, yy); } template<typename T> double dfcontractivedc(const T& C, const T& Cnew) { double nonlinearCoeff = 2.0 * w * (2.0 * C*C + Ca*Ca + 4.0*Ca*Cb + Cb*Cb); return nonlinearCoeff * Cnew; } template<typename T> double dfexpansivedc(const T& C) { return - 2. * w * (Ca + Cb) * (3. * C*C + Ca * Cb); } // Discrete Laplacian operator missing the central value, for implicit source terms template<int dim, typename T> double fringe_laplacian(const MMSP::grid<dim,MMSP::vector<T> >& GRID, const MMSP::vector<int>& x, const int field); #endif
[ "trevor.keller@nist.gov" ]
trevor.keller@nist.gov
2e2b2562225797ba19796b33c6a1676b05320ff0
5d54dbf946feaa143d83691c852364d039860adb
/145-binartTreePostorderTraversal.cpp
070640634895e6b32e821bbad9712b9e3fa6df6d
[]
no_license
finder023/leetCode
bda9a312ec465fe67f5ef2d9a55a5a66cf130db7
09c842553a3a6da1fcd567c46d1ff8a337815476
refs/heads/master
2021-04-28T09:43:11.362056
2019-03-05T09:05:42
2019-03-05T09:05:42
122,048,146
1
0
null
null
null
null
UTF-8
C++
false
false
828
cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: vector<int> postorderTraversal(TreeNode* root) { deque<int> dres; vector<int> res; stack<TreeNode*> d; if (!root) return res; TreeNode *node = root; while (!d.empty() || node) { if (node) { d.push(node); dres.push_front(node->val); node = node->right; } else { node = d.top(); d.pop(); node = node->left; } } res = vector<int>(dres.begin(), dres.end()); return res; } };
[ "liuyaolong023@163.com" ]
liuyaolong023@163.com
6b8cc99a98183a216c9f37a8dd19c788502bdb38
7f25ac596812ed201f289248de52d8d616d81b93
/Snickeen/201609154_CF14C.cpp
13415e373c77f445dafb5b58b6ae14c7cd7835ef
[]
no_license
AplusB/ACEveryDay
dc6ff890f9926d328b95ff536abf6510cef57eb7
e958245213dcdba8c7134259a831bde8b3d511bb
refs/heads/master
2021-01-23T22:15:34.946922
2018-04-07T01:45:20
2018-04-07T01:45:20
58,846,919
25
49
null
2016-07-14T10:38:25
2016-05-15T06:08:55
C++
UTF-8
C++
false
false
2,762
cpp
#include <bits/stdc++.h> //#pragma comment(linker, "/STACK:102400000,102400000") #include <stdio.h> #include <iostream> #include <iomanip> #include <fstream> #include <string.h> #include <stdlib.h> #include <time.h> #include <limits.h> #include <math.h> #include <algorithm> #include <deque> #include <queue> #include <stack> #include <list> #include <map> #include <set> #include <utility> #include <sstream> #include <complex> #include <string> #include <vector> #include <bitset> #include <functional> using namespace std; typedef long long LL; typedef unsigned long long ULL; typedef double db; typedef long double ldb; #define rep(i,a,b) for(i=a;i<b;i++) #define repu(i,a,b) for(i=a;i<=b;i++) #define repd(i,a,b) for(i=a;i>=b;i--) #define repc(i,a,b,c) for(i=a;i<b;i+=c) #define repcu(i,a,b,c) for(i=a;i<=b;i+=c) #define repcd(i,a,b,c) for(i=a;i>=b;i-=c) #define FIN freopen("input.in","r",stdin) #define FOUT freopen("output.out","w",stdout) #define CC(a) memset(a,0,sizeof(a)) #define MST(a,b) memset(a,b,sizeof(a)) #define PII pair<int,int> #define PLL pair<long long,long long> #define VI vector<int> #define VL vector<long long> #define VII vector<PII> #define VLL vector<PLL> #define all(x) x.begin(),x.end() #define mp make_pair #define pb push_back #define pf push_front template<typename T>inline void gn(T &x){ x=0;T f=1;char ch=getchar(); while(!isdigit(ch)){if(ch=='-')f=-1;ch=getchar();} while(isdigit(ch)){x=x*10+ch-'0';ch=getchar();} x*=f; } template<typename T>inline void gt(T x){ if(!x)return; gt(x/10);putchar(x%10+'0'); } const LL maxn=5e2+5; LL t,n,m,q,ans; LL MOD=1e9+7,inf=0x3f3f3f3f; db eps=1e-5; map<LL,LL> x,y; struct Point{ LL x,y; }f[11]; typedef Point Vector; Vector v[11]; LL cmp(Point a,Point b){ return a.x<b.x||(a.x==b.x&&a.y<b.y); } LL check(LL a,LL b){ LL i,j,k=0,l; repu(i,1,8){ if(f[i].x==a&&f[i].y==b)k++; } return k==2; } int main() { ios_base::sync_with_stdio(false);cin.tie(0); LL i,j,k,l,ca=0,xmin,xmax,ymin,ymax; xmin=ymin=1e18;xmax=ymax=-1e18; repu(i,1,8){ cin>>f[i].x>>f[i].y; xmin=min(xmin,f[i].x); xmax=max(xmax,f[i].x); ymin=min(ymin,f[i].y); ymax=max(ymax,f[i].y); } ans=0;ans+=check(xmin,ymin);ans+=check(xmax,ymin);ans+=check(xmin,ymax);ans+=check(xmax,ymax); // cout<<ans<<" "<<xmin<<" "<<xmax<<" "<<ymin<<" "<<ymax<<endl; if(ans!=4||xmin==xmax||ymin==ymax)return cout<<"NO"<<endl,0; for(i=1;i<8;i+=2){ j=(i+1)/2; v[j].x=abs(f[i].x-f[i+1].x),v[j].y=abs(f[i].y-f[i+1].y); if((v[j].x==0&&v[j].y==0)||(v[j].x!=0&&v[j].y!=0))return cout<<"NO"<<endl,0; } sort(v+1,v+5,cmp); if(v[1].x!=v[2].x||v[1].y!=v[2].y||v[3].x!=v[4].x||v[3].y!=v[4].y)return cout<<"NO"<<endl,0; if(v[2].x==v[3].x&&v[2].y==v[3].y)return cout<<"NO"<<endl,0; cout<<"YES"<<endl; return 0; }
[ "noreply@github.com" ]
AplusB.noreply@github.com
515ba33c32e01a644d9c5bbe8dcf4906299c8b17
b5ce216897e01573779b2d29bb3e8f3bd7e9d23c
/C++_blog(blog.eairship.kr)/3:namespace/using.cpp
42df77e72a9bce200456e966c5ad52326417b439
[]
no_license
dst02030/open_prac
f89aa071d88fe786103e7d69ecdb64088a248b13
c975a8d44dcf088f11035115d705cb9c4f4ea3f3
refs/heads/master
2021-08-27T21:31:45.873299
2017-12-10T12:09:27
2017-12-10T12:09:27
108,491,264
0
0
null
null
null
null
UTF-8
C++
false
false
263
cpp
#include <iostream> namespace A { void Add(){ std::cout<<"A의 Add() 호출!" << std::endl; } void Minus(){ printf("A의 Minus() 호출! \n"); } } using namespace A::Add; int main() { Add(); A::Minus(); return 0; }
[ "21600695@handong.edu" ]
21600695@handong.edu
6883f24b341436521fca771e608e60bd6f52f60e
3eaf7cf07c8b02ef66026d045e80f9f3d9331630
/Classes/You.h
c206a59d80e73fd0122393c5755003aef3d2cd66
[]
no_license
Zzzen/YourWorld
5c0b77a78e09f31d6bdac5602d14bb7144e95a5e
38ed9af9df90ab9e43241adb7c3750b3a8d0f03a
refs/heads/master
2018-01-08T11:33:30.044185
2016-03-13T15:58:12
2016-03-13T15:58:12
52,250,071
0
0
null
null
null
null
UTF-8
C++
false
false
1,617
h
#ifndef __YOU_H__ #define __YOU_H__ #include "cocos2d.h" #include "AttackableSprite.h" #include "SpriteEventData.h" #include "ui\UIScrollView.h" #include "ThrowableItem.h" USING_NS_CC; using namespace cocos2d::ui; class You : public AttackableSprite { public: static You* getInstance(); void setPosition(float x, float y) override; void setPosition(const Vec2& pos) override { setPosition(pos.x, pos.y); } ScrollView* showInventory(); bool initWithJson(const Document & json) override; Sprite* getItemLabel() const { return _itemLabel; } static You* create(); You(); ~You(); protected: AnimationConfig getAnimationConfig() const override { return AnimationConfig::yourSkeleton; } PhysicsBodyConfig getPhysicsBodyConfig() const override { return PhysicsBodyConfig::YOU; } string getClassName() const override { return "You"; } bool init() override; void updateCustom(float dt) override; float getUpdateInterval()const override { return 1.0f; } void die() override {} //display which is being prepared to throw Sprite* _itemLabel; ThrowableItem* _itemToThrow; private: int getOriginalMaxHP() const override { return 10000; } float getOriginalStrength()const override { return 10.0f; } float getOriginalMoveSpeed() const override { return 15.0f; } }; class YourMoveEvent : public SpriteEventData<You> { public: static YourMoveEvent* createWithWho(You* const sprite) { auto event = new YourMoveEvent(); event->initWithWho(sprite); event->autorelease(); return event; } static const std::string getName() { return "your_move_event"; } Point offset; }; #endif
[ "843968788@qq.com" ]
843968788@qq.com
4520dac745c34177b8edff705a65cefe46a380d2
a3d6556180e74af7b555f8d47d3fea55b94bcbda
/ash/system/privacy/privacy_indicators_tray_item_view.h
80afc7288f6fd3a4e2da0f699c52c8d9f3b0eb5f
[ "BSD-3-Clause" ]
permissive
chromium/chromium
aaa9eda10115b50b0616d2f1aed5ef35d1d779d6
a401d6cf4f7bf0e2d2e964c512ebb923c3d8832c
refs/heads/main
2023-08-24T00:35:12.585945
2023-08-23T22:01:11
2023-08-23T22:01:11
120,360,765
17,408
7,102
BSD-3-Clause
2023-09-10T23:44:27
2018-02-05T20:55:32
null
UTF-8
C++
false
false
7,211
h
// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef ASH_SYSTEM_PRIVACY_PRIVACY_INDICATORS_TRAY_ITEM_VIEW_H_ #define ASH_SYSTEM_PRIVACY_PRIVACY_INDICATORS_TRAY_ITEM_VIEW_H_ #include "ash/ash_export.h" #include "ash/public/cpp/session/session_observer.h" #include "ash/system/tray/tray_item_view.h" #include "base/memory/raw_ptr.h" #include "base/time/time.h" #include "base/timer/timer.h" #include "ui/compositor/throughput_tracker.h" namespace gfx { class LinearAnimation; } namespace views { class BoxLayout; } // namespace views namespace ash { class Shelf; // A tray item which resides in the system tray, indicating to users that an app // is currently accessing camera/microphone. class ASH_EXPORT PrivacyIndicatorsTrayItemView : public TrayItemView, public SessionObserver { public: enum AnimationState { // No animation is running. kIdle, // `expand_animation_` is running. kExpand, // `expand_animation_` finishes but the the shrink animation hasn't started // yet. The view will dwell at its expanded size. kDwellInExpand, // Happens when `longer_side_shrink_animation_` already started but // `shorter_side_shrink_animation_` hasn't started yet. kOnlyLongerSideShrink, // Happens when both the 2 shrink animations are animating. Note that // `longer_side_shrink_animation_` ended before // `shorter_side_shrink_animation_`, and this state ends when // `shorter_side_shrink_animation_` ends. kBothSideShrink, }; // This enum covers all the possible variations for the privacy indicators // view type that we are interested in recording metrics, specifying whether // camera/mic access and screen sharing icons are showing. Note to keep in // sync with enum PrivacyIndicatorsType in tools/metrics/histograms/enums.xml. enum class Type { kCamera = 1 << 1, kMicrophone = 1 << 2, kScreenSharing = 1 << 3, kCameraMicrophone = kCamera | kMicrophone, kCameraScreenSharing = kCamera | kScreenSharing, kMicrophoneScreenSharing = kMicrophone | kScreenSharing, kAllUsed = kCamera | kMicrophone | kScreenSharing, kMaxValue = kAllUsed, }; explicit PrivacyIndicatorsTrayItemView(Shelf* shelf); PrivacyIndicatorsTrayItemView(const PrivacyIndicatorsTrayItemView&) = delete; PrivacyIndicatorsTrayItemView& operator=( const PrivacyIndicatorsTrayItemView&) = delete; ~PrivacyIndicatorsTrayItemView() override; views::ImageView* camera_icon() { return camera_icon_; } views::ImageView* microphone_icon() { return microphone_icon_; } // Called by `PrivacyIndicatorsController` to update the view according to the // new state of camara/microphone access. `is_new_app`, `was_camera_in_use`, // and `was_microphone_in_use` are the information used to determine if we // should perform an animation. void OnCameraAndMicrophoneAccessStateChanged(bool is_camera_used, bool is_microphone_used, bool is_new_app, bool was_camera_in_use, bool was_microphone_in_use); // Update the view according to the state of screen sharing. void UpdateScreenShareStatus(bool is_screen_sharing); // Update the view according to the shelf alignment. void UpdateAlignmentForShelf(Shelf* shelf); // TrayItemView: std::u16string GetTooltipText(const gfx::Point& point) const override; // Update the view's visibility based on camera/mic access and screen sharing // state. void UpdateVisibility(); private: friend class PrivacyIndicatorsTrayItemViewTest; friend class CaptureModePrivacyIndicatorsTest; // TrayItemView: void PerformVisibilityAnimation(bool visible) override; void HandleLocaleChange() override; gfx::Size CalculatePreferredSize() const override; void OnThemeChanged() override; void OnBoundsChanged(const gfx::Rect& previous_bounds) override; views::View* GetTooltipHandlerForPoint(const gfx::Point& point) override; const char* GetClassName() const override; void AnimationProgressed(const gfx::Animation* animation) override; void AnimationEnded(const gfx::Animation* animation) override; void AnimationCanceled(const gfx::Animation* animation) override; void ImmediatelyUpdateVisibility() override; // Performs a sequence of expand, dwell, and then shrink animations to notify // users about the usage of camera, microphone, and screen sharing. void PerformAnimation(); // SessionObserver: void OnSessionStateChanged(session_manager::SessionState state) override; // Update the icons for the children views. void UpdateIcons(); // Update the bounds insets based on shelf alignment. void UpdateBoundsInset(); // Calculate the size of the view during shrink animation. We are calculating // for the longer side if `for_longer_side` is true, otherwise it is for // shorter side. int CalculateSizeDuringShrinkAnimation(bool for_longer_side) const; // Calculate the length of the longer size, based on `is_screen_sharing_`. int GetLongerSideLengthInExpandedMode() const; // End all 3 animations contained in this class. void EndAllAnimations(); // Record the type of privacy indicators that are showing. void RecordPrivacyIndicatorsType(); // Record repeated shows metric when the timer is stop. void RecordRepeatedShows(); raw_ptr<views::BoxLayout, ExperimentalAsh> layout_manager_ = nullptr; // Owned by the views hierarchy. raw_ptr<views::ImageView, ExperimentalAsh> camera_icon_ = nullptr; raw_ptr<views::ImageView, ExperimentalAsh> microphone_icon_ = nullptr; raw_ptr<views::ImageView, ExperimentalAsh> screen_share_icon_ = nullptr; // Keep track of the current screen sharing state. bool is_screen_sharing_ = false; // Keep track the current animation state during the multi-part animation. AnimationState animation_state_ = kIdle; // Animations for showing/expanding the view, then shrink it to be a dot. std::unique_ptr<gfx::LinearAnimation> expand_animation_; std::unique_ptr<gfx::LinearAnimation> longer_side_shrink_animation_; std::unique_ptr<gfx::LinearAnimation> shorter_side_shrink_animation_; // Timers for delaying shrink animations after `expand_animation_` is // completed. base::OneShotTimer longer_side_shrink_delay_timer_; base::OneShotTimer shorter_side_shrink_delay_timer_; // Used to record metrics of the number of shows per session. int count_visible_per_session_ = 0; // Used to record metrics of repeated shows per 100 ms. int count_repeated_shows_ = 0; base::DelayTimer repeated_shows_timer_; // Keeps track of the last time the indicator starts showing. Used to record // visibility duration metrics. base::Time start_showing_time_; // Measure animation smoothness metrics for all the animations. absl::optional<ui::ThroughputTracker> throughput_tracker_; }; } // namespace ash #endif // ASH_SYSTEM_PRIVACY_PRIVACY_INDICATORS_TRAY_ITEM_VIEW_H_
[ "chromium-scoped@luci-project-accounts.iam.gserviceaccount.com" ]
chromium-scoped@luci-project-accounts.iam.gserviceaccount.com
dc843ac27d55f673fb9cad2df23444ec282dcbf9
bc19e8435772dbb31d4f261eb4b7c4188cf2963c
/C&&C++/multiThread/rational.cpp
05e93dcb1ebb3ce0afbc29b6a13ce7a77b480220
[]
no_license
JRolly/studyProject
44f5aef37708d636b7256e10333afb5cce15e063
bd091739d9e3de96da429a9023ef309812485550
refs/heads/master
2020-04-08T01:32:25.946570
2018-11-24T04:30:15
2018-11-24T04:30:15
158,899,139
0
0
null
null
null
null
UTF-8
C++
false
false
795
cpp
#include "multiThread/rational.h" rational::rational(long Num, long Den) { Numerator = Num; if (Den == 0) { Exception.message("Zero is not a valid Denominator!"); throw Exception; } Denominator = Den; } rational::rational(const rational &X) { Numerator = X.Numerator; Denominator = X.Denominator; } virtual void assign(long X, long Y); rational operator*(const rational &X); rational operator+(const rational &X); rational operator/(const rational &X); rational operator-(const rational &X); rational &operator=(const rational &X); int operator==(const rational &X); long numerator(void) const; long denominator(void) const; friend ostream &operator<<(ostream &out, rational X); void reduce(void); )
[ "1769943250@qq.com" ]
1769943250@qq.com
e66cedf0ff3e13474a194c1aa4f382993ba9d596
6da337ac13e6f51305a42e47647c093ac2e4f512
/ClawSearch/Scratch/Stream.hpp
aefeb62ab20690ec609163232586095b9bbe3405
[]
no_license
melbshark/ClawSearch
5a9f538b09065b68a2d387fa9ee81c3d9605a649
0bf52e10b5e706003552cc86ae8fe63f7d6cab4b
refs/heads/master
2021-06-24T17:18:48.793718
2016-11-27T18:56:18
2016-11-27T18:56:18
null
0
0
null
null
null
null
UTF-8
C++
false
false
6,266
hpp
/* libscratch - Multipurpose objective C++ library. Copyright (c) 2013 - 2016 Angelo Geels <spansjh@gmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #pragma once #include "Common.h" #include "String.hpp" SCRATCH_NAMESPACE_BEGIN; enum ENewLineMode { ENLM_CRLF, ENLM_LF, ENLM_CR, }; class Stream { public: ENewLineMode strm_nlmNewLineMode; public: Stream(); ~Stream(); virtual uint32_t Size() = 0; virtual uint32_t Location() = 0; virtual void Seek(int32_t iPos, int32_t iOrigin) = 0; virtual bool AtEOF() = 0; virtual void Flush(); virtual void Close(); virtual void Write(const void* p, uint32_t iLen) = 0; inline void WriteIndex(const int32_t &i) { Write(&i, sizeof(int32_t)); } inline void WriteLong(const int64_t &l) { Write(&l, sizeof(int64_t)); } inline void WriteFloat(const float &f) { Write(&f, sizeof(float)); } inline void WriteDouble(const double &d) { Write(&d, sizeof(double)); } void WriteString(const String &str); void WriteStream(Stream &strm); virtual int Read(void* pDest, uint32_t iLen) = 0; void ReadToEnd(void* pDest); inline int32_t ReadIndex() { int32_t i = 0; Read(&i, sizeof(int32_t)); return i; } inline int64_t ReadLong() { int64_t l = 0; Read(&l, sizeof(int64_t)); return l; } inline float ReadFloat() { float f = 0; Read(&f, sizeof(float)); return f; } inline double ReadDouble() { double d = 0; Read(&d, sizeof(double)); return d; } String ReadString(); inline char ReadChar() { char c = '\0'; Read(&c, 1); return c; } inline char PeekChar() { char c = '\0'; Read(&c, 1); Seek(-1, 1/*SEEK_CUR*/); return c; } bool Expect(const String &str); char ReadUntil(String &strOut, const String &strCharacters); void WriteText(const String &str); void WriteLine(const String &str); void WriteLine(); String ReadLine(); inline Stream& operator <<(int32_t i) { WriteIndex(i); return *this; } inline Stream& operator <<(float f) { WriteFloat(f); return *this; } inline Stream& operator <<(double d) { WriteDouble(d); return *this; } inline Stream& operator <<(String str) { WriteString(str); return *this; } inline Stream& operator <<(Stream &strm) { WriteStream(strm); return *this; } inline Stream& operator >>(int32_t &i) { i = ReadIndex(); return *this; } inline Stream& operator >>(float &f) { f = ReadFloat(); return *this; } inline Stream& operator >>(double &d) { d = ReadDouble(); return *this; } inline Stream& operator >>(String &str) { str = ReadString(); return *this; } }; #ifdef SCRATCH_IMPL Stream::Stream() { strm_nlmNewLineMode = ENLM_LF; } Stream::~Stream() { Close(); } void Stream::Flush() { } void Stream::Close() { } void Stream::WriteString(const String &str) { Write((const char*)str, strlen(str) + 1); } void Stream::WriteStream(Stream &strm) { // get buffer size uint32_t ulBufferSize = strm.Size() - strm.Location(); uint32_t ulBytesLeft = ulBufferSize; // allocate memory for chunks uint32_t ulChunkSize = 1024; void* pBuffer = malloc(ulChunkSize); // loop through chunks required to write while (ulBytesLeft > 0) { // check for end of stream if (ulBytesLeft < ulChunkSize) { ulChunkSize = ulBytesLeft; } // read chunk from other stream strm.Read(pBuffer, ulChunkSize); // write chunk into our stream Write(pBuffer, ulChunkSize); } // we're done, deallocate buffer free(pBuffer); } void Stream::ReadToEnd(void* pDest) { Read(pDest, Size() - Location()); } String Stream::ReadString() { String strRet; char c; do { // read 1 character Read(&c, sizeof(char)); // if it's not the terminator if (c != '\0') { // he'll be back strRet += c; } } while (c != '\0'); // done, return return strRet; } bool Stream::Expect(const String &str) { int iLen = strlen(str); char* szBuffer = new char[iLen + 1]; szBuffer[iLen] = '\0'; Read(szBuffer, iLen); bool ret = (str == szBuffer); if (!ret) { Seek(-iLen, SEEK_CUR); } delete[] szBuffer; return ret; } char Stream::ReadUntil(String &strOut, const String &strCharacters) { String ret; char ccc = '\0'; while (!AtEOF()) { char cc = ReadChar(); if (strCharacters.Contains(cc)) { ccc = cc; break; } ret += cc; } strOut = ret; return ccc; } void Stream::WriteText(const String &str) { // write text Write((const char*)str, str.Size()); } void Stream::WriteLine(const String &str) { // write text WriteText(str); // write newline WriteLine(); } void Stream::WriteLine() { // write newline switch (strm_nlmNewLineMode) { case ENLM_CRLF: Write("\r\n", 2); break; case ENLM_LF: Write("\n", 1); break; case ENLM_CR: Write("\r", 1); break; } } String Stream::ReadLine() { String strRet; char c; do { // read 1 character Read(&c, sizeof(char)); // if at EOF if (AtEOF()) { // we're done here break; } // skip \r if (c == '\r') { //WARNING: This can potentially cause problems on certain operating systems // that work with \r _only_ as a newline character. We should incorporate // strm_nlmNewLineMode with this in a future version. continue; } // if it's not the terminator if (c != '\n') { // he'll be back strRet += c; } } while (c != '\n'); // done, return return strRet; } #endif SCRATCH_NAMESPACE_END;
[ "spansjh@gmail.com" ]
spansjh@gmail.com
3361d275e14e47f4c8af23a5f49cd35bf8625243
5b67740a1c09530df6303018f1643a7df560a1f4
/editcomment.h
e46d65d09287d1cbe76de7703679c5b04cc1b908
[]
no_license
aeternu/ICD_Creator
e03f48bd3796af4a3db09872df65286ee6884761
dfcf7707173a775de3b2f2b7e063715919526d3a
refs/heads/master
2020-03-17T18:54:51.288881
2017-10-06T06:35:26
2017-10-06T06:35:26
null
0
0
null
null
null
null
UTF-8
C++
false
false
735
h
#ifndef EDITCOMMENT_H #define EDITCOMMENT_H #include <QtGui> #include <QDialog> #include "domitem.h" class EditComment : public QDialog { Q_OBJECT DomItem *target; public: EditComment(QWidget *parent = 0); ~EditComment(); void setTarget(DomItem *pTarget); private: void error(const QString& message); void init(); void retranslateUi() { setWindowTitle(QApplication::translate("EditComment", "Edit Comment", 0, QApplication::UnicodeUTF8)); } QVBoxLayout *verticalLayout_2; QVBoxLayout *verticalLayout; QPlainTextEdit *commentText; QDialogButtonBox *buttonBox; private slots: void accept(); void on_commentText_textChange(); }; #endif // EDITCOMMENT_H
[ "zhangle3145@163.com" ]
zhangle3145@163.com
e80699d0edf9a13ab7e2b17264bea44c12f07ea2
e4352c5b69c99aeed9e3cd36f9f2660779dd33ff
/src/dialogFileDemOther.cpp
f09b78bbf22fece9bb1eeb685721fda044f3fde4
[ "Apache-2.0" ]
permissive
USArmyResearchLab/Fusion3D
13daf624fa4d390bf74b1764e1ad6e63df7aac88
98b79ccfcbfd444a924f65c321482b540382758d
refs/heads/main
2023-07-15T20:55:07.802074
2021-09-01T21:56:59
2021-09-01T21:56:59
310,362,417
6
1
null
null
null
null
UTF-8
C++
false
false
5,395
cpp
#include "internals.h" dialogFileDemOther::dialogFileDemOther(QWidget *parent) : QDialog(parent) { setupUi(this); } dialogFileDemOther::~dialogFileDemOther() { } // ******************************************************* /// Register map3d_index_class in order to use its dir_class. // ******************************************************* int dialogFileDemOther::register_map3d_index_class(map3d_index_class *map3d_index_in) { map3d_index = map3d_index_in; return(1); } // ******************************************************* /// Register map3d_index_class in order to use its dir_class. // ******************************************************* void dialogFileDemOther::doLoad() { int i; dir_class *dir = map3d_index->get_dir_class(); string fileNameString, filename, dirname; for (i = 0; i < fileNamesPrim.length(); i++) { fileNameString = fileNamesPrim[i].toStdString(); dir->add_file(fileNameString, 0); parse_filepath(fileNameString, filename, dirname); // From entire path, get path (no file) and filename (no path) dir->set_dem_dir(dirname); } for (i = 0; i < fileNamesSec.length(); i++) { fileNameString = fileNamesSec[i].toStdString(); dir->add_file(fileNameString, 1); } for (i = 0; i < fileNamesTex.length(); i++) { fileNameString = fileNamesTex[i].toStdString(); dir->add_file(fileNameString, 2); } for (i = 0; i < fileNamesKml.length(); i++) { fileNameString = fileNamesKml[i].toStdString(); dir->add_file(fileNameString, 3); } if (dir->check_valid_demset()) { // Proceed only for valid DEM dataset dir->set_dem_fileset_defined(); SoSFInt32* GL_open_flag = (SoSFInt32*)SoDB::getGlobalField("Open-File"); GL_open_flag->setValue(28); // Signal that a new map is to be loaded accept(); } else { dir->clear_demset(); } } // ******************************************************* /// Cancel -- do nothing. // ******************************************************* void dialogFileDemOther::doCancel() { close(); } // ******************************************************* /// Enter Primary DEM files selected into dir_class. // ******************************************************* void dialogFileDemOther::doPrimBrowse() { QFileDialog dialog(this); dialog.setFileMode(QFileDialog::ExistingFiles); // Multiple existing file dialog.setAcceptMode(QFileDialog::AcceptOpen); // Open vs Save dialog.setNameFilter(tr("GeoTiff Files (*.tif)")); dialog.setWindowTitle(tr("Open Input Primary DEM Files")); dialog.setViewMode(QFileDialog::Detail); if (dialog.exec()) { fileNamesPrim = dialog.selectedFiles(); if (fileNamesPrim.size() == 1) { PrimEdit->setText(fileNamesPrim[0]); } else { QString tt = QString::number(fileNamesPrim.size());; tt.append(" files chosen"); PrimEdit->setText(tt); } //windowIconTextChanged("test"); } } // ******************************************************* /// Enter Primary DEM files selected into dir_class. // ******************************************************* void dialogFileDemOther::doSecBrowse() { QFileDialog dialog(this); dialog.setFileMode(QFileDialog::ExistingFiles); // Multiple existing file dialog.setAcceptMode(QFileDialog::AcceptOpen); // Open vs Save dialog.setNameFilter(tr("GeoTiff Files (*.tif)")); dialog.setWindowTitle(tr("Open Input Secondary DEM Files")); dialog.setViewMode(QFileDialog::Detail); if (dialog.exec()) { fileNamesSec = dialog.selectedFiles(); if (fileNamesSec.size() == 1) { secEdit->setText(fileNamesSec[0]); } else { QString tt = QString::number(fileNamesSec.size());; tt.append(" files chosen"); secEdit->setText(tt); } } } // ******************************************************* /// Enter Texture files selected into dir_class. // ******************************************************* void dialogFileDemOther::doTexBrowse() { QFileDialog dialog(this); dialog.setFileMode(QFileDialog::ExistingFiles); // Multiple existing file dialog.setAcceptMode(QFileDialog::AcceptOpen); // Open vs Save dialog.setNameFilter(tr("GeoTiff or MrSID Files (*.tif *.sid)")); dialog.setWindowTitle(tr("Open Input Texture Files")); dialog.setViewMode(QFileDialog::Detail); if (dialog.exec()) { fileNamesTex = dialog.selectedFiles(); if (fileNamesTex.size() == 1) { texEdit->setText(fileNamesTex[0]); } else { QString tt = QString::number(fileNamesTex.size());; tt.append(" files chosen"); texEdit->setText(tt); } } } // ******************************************************* /// Enter KML files selected into dir_class. // ******************************************************* void dialogFileDemOther::doKmlBrowse() { QFileDialog dialog(this); dialog.setFileMode(QFileDialog::ExistingFiles); // Multiple existing file dialog.setAcceptMode(QFileDialog::AcceptOpen); // Open vs Save dialog.setNameFilter(tr("KML Files (*.kml)")); dialog.setWindowTitle(tr("Open Input KML Extent Files")); dialog.setViewMode(QFileDialog::Detail); if (dialog.exec()) { fileNamesKml = dialog.selectedFiles(); if (fileNamesKml.size() == 1) { kmlEdit->setText(fileNamesKml[0]); } else { QString tt = QString::number(fileNamesKml.size());; tt.append(" files chosen"); kmlEdit->setText(tt); } } }
[ "damon.m.conover.civ@mail.mil" ]
damon.m.conover.civ@mail.mil
98a3124f957018db317fb9b071e421d9f97d9e37
bf59ed60f9a67e8f7d09570e85256ea37e548291
/avedit/src/main/cpp/avplay/audio/IAudioPlayer.cpp
e5e81fed67eea6a6b31e6d39898a32a5f2db6533
[]
no_license
sengeiou/KAVEdit
29266ea14c6e36a8f24eb168db6b0db50a0efd07
7252739e8425d92e9be79514ea2e90132f9f8a8c
refs/heads/master
2022-08-24T05:17:29.484114
2020-05-24T11:46:09
2020-05-24T11:46:09
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,188
cpp
// // Created by 阳坤 on 2020-05-22. // #include "IAudioPlayer.h" void IAudioPlayer::update(AVData data) { //压入缓冲队列 if (data.size <= 0 || !data.data) return; while (!isExit) { framesMutex.lock(); if (frames.size() > maxFrames) { framesMutex.unlock(); sleep(); continue; } frames.push_back(data); framesMutex.unlock(); break; } } AVData IAudioPlayer::getData() { AVData d; isRuning = true; while (!isExit) { if (isPause()) { sleep(2); continue; } framesMutex.lock(); if (!frames.empty()) { //有数据返回 d = frames.front(); frames.pop_front(); framesMutex.unlock(); pts = d.pts; return d; } framesMutex.unlock(); sleep(); } isRuning = false; //未获取数据 return d; } void IAudioPlayer::clear() { framesMutex.lock(); while (!frames.empty()) { if (frames.front().data) frames.front().drop(); frames.pop_front(); } framesMutex.unlock(); }
[ "yang1001yk@gmail.com" ]
yang1001yk@gmail.com
49a1fb8113b30f18dc24c4f9bfbe90e717b09062
b46b32726bf5574ef33891a871202071fccd9625
/src/resources/resources.h
a3380f96800f5bece2e0117acb841c4a6be0959b
[ "WTFPL" ]
permissive
alexeyden/whack
43422fd874d8bdf26ab372dd4474074adbac612e
2bff3beb0afb8c5aaba996b2838d2f0b9797039c
refs/heads/main
2023-02-27T02:21:06.071758
2021-02-01T07:46:41
2021-02-01T07:46:41
334,870,033
0
0
null
null
null
null
UTF-8
C++
false
false
647
h
#ifndef RESOURCES_H #define RESOURCES_H #include <map> #include <string> #include "graphics/textureatlas.h" #include "backend/backend.h" class Resources { private: Resources(); public: ~Resources(); void loadAtlas(const char* path, const std::string& id); const TextureAtlas* atlas(const std::string& id) const { return _sheets.at(id); } const std::map<std::string, TextureAtlas*>& atlases() const { return _sheets; } static void init(Backend* be); static Resources* i(); private: std::map<std::string, TextureAtlas*> _sheets; static Backend* _backend; static Resources* _instance; }; #endif // RESOURCES_H
[ "rtgbnm@gmail.com" ]
rtgbnm@gmail.com
055ae35cea2594891ce97bc6aa929c6cf767ffa2
c324a7ff4dc9adbd38e53ada43a964a4ae505e15
/cpp/src/fourier_motzkin.cpp
f55f539c739539b51c69d18b080b5bdb9d99823a
[]
no_license
on62/mwt
dfc14d7d414d8242d3c747b8709979b258f0adcc
3e84e2b20ca21be61512618781c222a7ed912c07
refs/heads/master
2022-02-28T03:05:05.862373
2019-09-02T08:43:51
2019-09-02T08:43:51
null
0
0
null
null
null
null
UTF-8
C++
false
false
3,565
cpp
// fourier_motzkin.cpp #include "fourier_motzkin.h" #include <algorithm> #include <iterator> using namespace std; // true iff index is "a member of" slice bool index_in_slice(size_t index, const slice &s) { return ((index - s.start()) % s.stride() == 0) && s.start() <= index && index <= s.start() + s.stride()*(s.size()-1); } // Fourier Motzkin Elimation // Fourier Motzkin Elimation on index k Matrix fourier_motzkin(Matrix M, size_t k) { Matrix result{M.d}; // Partition into Z,P,N const auto z_end = partition(M.begin(), M.end(), [k](const Vector &v) { return v[k] == 0; }); const auto p_end = partition(z_end, M.end(), [k](const Vector &v) { return v[k] > 0; }); // Move Z to result move(M.begin(), z_end, back_inserter(result)); // convolute vectors from P,N for (auto p_it = z_end; p_it != p_end; ++p_it) { for (auto n_it = p_end; n_it != M.end(); ++n_it) { result.push_back( (*p_it)[k]*(*n_it) - (*n_it)[k]*(*p_it)); } } return result; } // Fourier Motzkin, on each index not in slice, then slice the result Matrix sliced_fourier_motzkin(Matrix M, const slice &s) { for (size_t k = 0; k < M.d; ++k) { if (!index_in_slice(k,s)) { M = fourier_motzkin(M, k); } } return slice_matrix(M, s); } // refactored lift operation // // transforms set of column vectors as so: // // ___d__ ___n__ // n n| 0 C[0]*I| // d|U| -> d|C[1]*I C[2]*U| // d|C[3]*I C[4]*U| // // transforms set of row vectors as so: // // ___n__ ___d__ ___d__ // d d| 0 C[1]*I C[3]*I| // n|A| -> n|C[0]*I C[2]*A C[4]*A| // Matrix generalized_lift(const Matrix &cone, const array<double,5> &C) { const size_t d = cone.d; const size_t n = cone.size(); Matrix result{d+n}; Matrix cone_t = transpose(cone); // |0 C[0]*I| |0 | // |C[0]*I| for (size_t i = 0; i < n; ++i) { result.add_Vector()[d+i] = C[0]; } size_t k = 0; // |C[1]*I C[2]*U| |C[1]*I| // |C[2]*A| for (auto &&row_t : cone_t) { result.push_back( concatenate(C[1]*e_k(d,k++), C[2]*row_t)); } k = 0; // |C[3]*I C[4]*U| |C[3]*I| // |C[4]*A| for (auto &&row_t : cone_t) { result.push_back( concatenate(C[3]*e_k(d,k++), C[4]*row_t)); } return result; } // represent vcone as projection of hcone // d p // p p| 0 -I| // d |U| -> d| I -U| // d|-I U| // Matrix lift_vcone(const Matrix &vcone) { return generalized_lift(vcone, {-1,1,-1,-1,1}); } // represent hcone as projection of vcone // m d d // d d|0 I -I| // m|A| -> m|I A -A| // Matrix lift_hcone(const Matrix &hcone) { return generalized_lift(hcone, {1,1,1,-1,-1}); } // refactored transformation algorithm Matrix cone_transform(const Matrix &cone, LiftSelector lift) { if (cone.empty()) { throw logic_error{"empty cone for transform"}; } switch (lift) { case LiftSelector::lift_vcone: { return sliced_fourier_motzkin( lift_vcone(cone), slice(0, cone.d, 1)); } break; case LiftSelector::lift_hcone: { return sliced_fourier_motzkin( lift_hcone(cone), slice(0, cone.d, 1)); } break; default: { throw std::logic_error{"invalid LiftSelector"}; } } } Matrix vcone_to_hcone(Matrix vcone) { return cone_transform(vcone,LiftSelector::lift_vcone); } Matrix hcone_to_vcone(Matrix hcone) { return cone_transform(hcone,LiftSelector::lift_hcone); }
[ "nathan.s.chappell@gmail.com" ]
nathan.s.chappell@gmail.com
dda17d06c5f4ef5d0de20ebacab749b4730b437e
daebfc0523315d688e217652146e25e0d686800e
/src/qt/coincontroldialog.cpp
6246fd8446f34dc68c36e45907a11d6afe0ae9ed
[ "MIT" ]
permissive
devo2018/agon
62bf3b1e800cee594944551759cf1a6381a6442e
c07415225e6b1fe870bfb728d2c24457b3db5b89
refs/heads/master
2020-04-08T03:21:48.985897
2018-12-19T21:28:23
2018-12-19T21:28:23
158,972,556
0
0
null
null
null
null
UTF-8
C++
false
false
37,977
cpp
// Copyright (c) 2011-2014 The Bitcoin developers // Copyright (c) 2014-2015 The Dash developers // Copyright (c) 2015-2017 The PIVX developers // Copyright (c) 2017-2018 The Agon developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "coincontroldialog.h" #include "ui_coincontroldialog.h" #include "addresstablemodel.h" #include "bitcoinunits.h" #include "guiutil.h" #include "init.h" #include "optionsmodel.h" #include "walletmodel.h" #include "coincontrol.h" #include "main.h" #include "obfuscation.h" #include "wallet.h" #include "multisigdialog.h" #include <boost/assign/list_of.hpp> // for 'map_list_of()' #include <QApplication> #include <QCheckBox> #include <QCursor> #include <QDialogButtonBox> #include <QFlags> #include <QIcon> #include <QSettings> #include <QString> #include <QTreeWidget> #include <QTreeWidgetItem> using namespace std; QList<CAmount> CoinControlDialog::payAmounts; int CoinControlDialog::nSplitBlockDummy; CCoinControl* CoinControlDialog::coinControl = new CCoinControl(); CoinControlDialog::CoinControlDialog(QWidget* parent, bool fMultisigEnabled) : QDialog(parent), ui(new Ui::CoinControlDialog), model(0) { ui->setupUi(this); this->fMultisigEnabled = fMultisigEnabled; /* Open CSS when configured */ this->setStyleSheet(GUIUtil::loadStyleSheet()); // context menu actions QAction* copyAddressAction = new QAction(tr("Copy address"), this); QAction* copyLabelAction = new QAction(tr("Copy label"), this); QAction* copyAmountAction = new QAction(tr("Copy amount"), this); copyTransactionHashAction = new QAction(tr("Copy transaction ID"), this); // we need to enable/disable this lockAction = new QAction(tr("Lock unspent"), this); // we need to enable/disable this unlockAction = new QAction(tr("Unlock unspent"), this); // we need to enable/disable this // context menu contextMenu = new QMenu(); contextMenu->addAction(copyAddressAction); contextMenu->addAction(copyLabelAction); contextMenu->addAction(copyAmountAction); contextMenu->addAction(copyTransactionHashAction); contextMenu->addSeparator(); contextMenu->addAction(lockAction); contextMenu->addAction(unlockAction); // context menu signals connect(ui->treeWidget, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showMenu(QPoint))); connect(copyAddressAction, SIGNAL(triggered()), this, SLOT(copyAddress())); connect(copyLabelAction, SIGNAL(triggered()), this, SLOT(copyLabel())); connect(copyAmountAction, SIGNAL(triggered()), this, SLOT(copyAmount())); connect(copyTransactionHashAction, SIGNAL(triggered()), this, SLOT(copyTransactionHash())); connect(lockAction, SIGNAL(triggered()), this, SLOT(lockCoin())); connect(unlockAction, SIGNAL(triggered()), this, SLOT(unlockCoin())); // clipboard actions QAction* clipboardQuantityAction = new QAction(tr("Copy quantity"), this); QAction* clipboardAmountAction = new QAction(tr("Copy amount"), this); QAction* clipboardFeeAction = new QAction(tr("Copy fee"), this); QAction* clipboardAfterFeeAction = new QAction(tr("Copy after fee"), this); QAction* clipboardBytesAction = new QAction(tr("Copy bytes"), this); QAction* clipboardPriorityAction = new QAction(tr("Copy priority"), this); QAction* clipboardLowOutputAction = new QAction(tr("Copy dust"), this); QAction* clipboardChangeAction = new QAction(tr("Copy change"), this); connect(clipboardQuantityAction, SIGNAL(triggered()), this, SLOT(clipboardQuantity())); connect(clipboardAmountAction, SIGNAL(triggered()), this, SLOT(clipboardAmount())); connect(clipboardFeeAction, SIGNAL(triggered()), this, SLOT(clipboardFee())); connect(clipboardAfterFeeAction, SIGNAL(triggered()), this, SLOT(clipboardAfterFee())); connect(clipboardBytesAction, SIGNAL(triggered()), this, SLOT(clipboardBytes())); connect(clipboardPriorityAction, SIGNAL(triggered()), this, SLOT(clipboardPriority())); connect(clipboardLowOutputAction, SIGNAL(triggered()), this, SLOT(clipboardLowOutput())); connect(clipboardChangeAction, SIGNAL(triggered()), this, SLOT(clipboardChange())); ui->labelCoinControlQuantity->addAction(clipboardQuantityAction); ui->labelCoinControlAmount->addAction(clipboardAmountAction); ui->labelCoinControlFee->addAction(clipboardFeeAction); ui->labelCoinControlAfterFee->addAction(clipboardAfterFeeAction); ui->labelCoinControlBytes->addAction(clipboardBytesAction); ui->labelCoinControlPriority->addAction(clipboardPriorityAction); ui->labelCoinControlLowOutput->addAction(clipboardLowOutputAction); ui->labelCoinControlChange->addAction(clipboardChangeAction); // toggle tree/list mode connect(ui->radioTreeMode, SIGNAL(toggled(bool)), this, SLOT(radioTreeMode(bool))); connect(ui->radioListMode, SIGNAL(toggled(bool)), this, SLOT(radioListMode(bool))); // click on checkbox connect(ui->treeWidget, SIGNAL(itemChanged(QTreeWidgetItem*, int)), this, SLOT(viewItemChanged(QTreeWidgetItem*, int))); // click on header #if QT_VERSION < 0x050000 ui->treeWidget->header()->setClickable(true); #else ui->treeWidget->header()->setSectionsClickable(true); #endif connect(ui->treeWidget->header(), SIGNAL(sectionClicked(int)), this, SLOT(headerSectionClicked(int))); // ok button connect(ui->buttonBox, SIGNAL(clicked(QAbstractButton*)), this, SLOT(buttonBoxClicked(QAbstractButton*))); // (un)select all connect(ui->pushButtonSelectAll, SIGNAL(clicked()), this, SLOT(buttonSelectAllClicked())); // Toggle lock state connect(ui->pushButtonToggleLock, SIGNAL(clicked()), this, SLOT(buttonToggleLockClicked())); // change coin control first column label due Qt4 bug. // see https://github.com/bitcoin/bitcoin/issues/5716 ui->treeWidget->headerItem()->setText(COLUMN_CHECKBOX, QString()); ui->treeWidget->setColumnWidth(COLUMN_CHECKBOX, 84); ui->treeWidget->setColumnWidth(COLUMN_AMOUNT, 100); ui->treeWidget->setColumnWidth(COLUMN_LABEL, 170); ui->treeWidget->setColumnWidth(COLUMN_ADDRESS, 190); ui->treeWidget->setColumnWidth(COLUMN_DATE, 80); ui->treeWidget->setColumnWidth(COLUMN_CONFIRMATIONS, 100); ui->treeWidget->setColumnWidth(COLUMN_PRIORITY, 100); ui->treeWidget->setColumnHidden(COLUMN_TXHASH, true); // store transacton hash in this column, but dont show it ui->treeWidget->setColumnHidden(COLUMN_VOUT_INDEX, true); // store vout index in this column, but dont show it ui->treeWidget->setColumnHidden(COLUMN_AMOUNT_INT64, true); // store amount int64 in this column, but dont show it ui->treeWidget->setColumnHidden(COLUMN_PRIORITY_INT64, true); // store priority int64 in this column, but dont show it ui->treeWidget->setColumnHidden(COLUMN_DATE_INT64, true); // store date int64 in this column, but dont show it // default view is sorted by amount desc sortView(COLUMN_AMOUNT_INT64, Qt::DescendingOrder); // restore list mode and sortorder as a convenience feature QSettings settings; if (settings.contains("nCoinControlMode") && !settings.value("nCoinControlMode").toBool()) ui->radioTreeMode->click(); if (settings.contains("nCoinControlSortColumn") && settings.contains("nCoinControlSortOrder")) sortView(settings.value("nCoinControlSortColumn").toInt(), ((Qt::SortOrder)settings.value("nCoinControlSortOrder").toInt())); } CoinControlDialog::~CoinControlDialog() { QSettings settings; settings.setValue("nCoinControlMode", ui->radioListMode->isChecked()); settings.setValue("nCoinControlSortColumn", sortColumn); settings.setValue("nCoinControlSortOrder", (int)sortOrder); delete ui; } void CoinControlDialog::setModel(WalletModel* model) { this->model = model; if (model && model->getOptionsModel() && model->getAddressTableModel()) { updateView(); updateLabelLocked(); CoinControlDialog::updateLabels(model, this); updateDialogLabels(); } } // helper function str_pad QString CoinControlDialog::strPad(QString s, int nPadLength, QString sPadding) { while (s.length() < nPadLength) s = sPadding + s; return s; } // ok button void CoinControlDialog::buttonBoxClicked(QAbstractButton* button) { if (ui->buttonBox->buttonRole(button) == QDialogButtonBox::AcceptRole) done(QDialog::Accepted); // closes the dialog } // (un)select all void CoinControlDialog::buttonSelectAllClicked() { Qt::CheckState state = Qt::Checked; for (int i = 0; i < ui->treeWidget->topLevelItemCount(); i++) { if (ui->treeWidget->topLevelItem(i)->checkState(COLUMN_CHECKBOX) != Qt::Unchecked) { state = Qt::Unchecked; break; } } ui->treeWidget->setEnabled(false); for (int i = 0; i < ui->treeWidget->topLevelItemCount(); i++) if (ui->treeWidget->topLevelItem(i)->checkState(COLUMN_CHECKBOX) != state) ui->treeWidget->topLevelItem(i)->setCheckState(COLUMN_CHECKBOX, state); ui->treeWidget->setEnabled(true); if (state == Qt::Unchecked) coinControl->UnSelectAll(); // just to be sure CoinControlDialog::updateLabels(model, this); updateDialogLabels(); } // Toggle lock state void CoinControlDialog::buttonToggleLockClicked() { QTreeWidgetItem* item; // Works in list-mode only if (ui->radioListMode->isChecked()) { ui->treeWidget->setEnabled(false); for (int i = 0; i < ui->treeWidget->topLevelItemCount(); i++) { item = ui->treeWidget->topLevelItem(i); if (item->text(COLUMN_TYPE) == "MultiSig") continue; COutPoint outpt(uint256(item->text(COLUMN_TXHASH).toStdString()), item->text(COLUMN_VOUT_INDEX).toUInt()); if (model->isLockedCoin(uint256(item->text(COLUMN_TXHASH).toStdString()), item->text(COLUMN_VOUT_INDEX).toUInt())) { model->unlockCoin(outpt); item->setDisabled(false); item->setIcon(COLUMN_CHECKBOX, QIcon()); } else { model->lockCoin(outpt); item->setDisabled(true); item->setIcon(COLUMN_CHECKBOX, QIcon(":/icons/lock_closed")); } updateLabelLocked(); } ui->treeWidget->setEnabled(true); CoinControlDialog::updateLabels(model, this); updateDialogLabels(); } else { QMessageBox msgBox; msgBox.setObjectName("lockMessageBox"); msgBox.setStyleSheet(GUIUtil::loadStyleSheet()); msgBox.setText(tr("Please switch to \"List mode\" to use this function.")); msgBox.exec(); } } // context menu void CoinControlDialog::showMenu(const QPoint& point) { QTreeWidgetItem* item = ui->treeWidget->itemAt(point); if (item) { contextMenuItem = item; // disable some items (like Copy Transaction ID, lock, unlock) for tree roots in context menu if (item->text(COLUMN_TXHASH).length() == 64) // transaction hash is 64 characters (this means its a child node, so its not a parent node in tree mode) { copyTransactionHashAction->setEnabled(true); if (model->isLockedCoin(uint256(item->text(COLUMN_TXHASH).toStdString()), item->text(COLUMN_VOUT_INDEX).toUInt())) { lockAction->setEnabled(false); unlockAction->setEnabled(true); } else { lockAction->setEnabled(true); unlockAction->setEnabled(false); } } else // this means click on parent node in tree mode -> disable all { copyTransactionHashAction->setEnabled(false); lockAction->setEnabled(false); unlockAction->setEnabled(false); } // show context menu contextMenu->exec(QCursor::pos()); } } // context menu action: copy amount void CoinControlDialog::copyAmount() { GUIUtil::setClipboard(BitcoinUnits::removeSpaces(contextMenuItem->text(COLUMN_AMOUNT))); } // context menu action: copy label void CoinControlDialog::copyLabel() { if (ui->radioTreeMode->isChecked() && contextMenuItem->text(COLUMN_LABEL).length() == 0 && contextMenuItem->parent()) GUIUtil::setClipboard(contextMenuItem->parent()->text(COLUMN_LABEL)); else GUIUtil::setClipboard(contextMenuItem->text(COLUMN_LABEL)); } // context menu action: copy address void CoinControlDialog::copyAddress() { if (ui->radioTreeMode->isChecked() && contextMenuItem->text(COLUMN_ADDRESS).length() == 0 && contextMenuItem->parent()) GUIUtil::setClipboard(contextMenuItem->parent()->text(COLUMN_ADDRESS)); else GUIUtil::setClipboard(contextMenuItem->text(COLUMN_ADDRESS)); } // context menu action: copy transaction id void CoinControlDialog::copyTransactionHash() { GUIUtil::setClipboard(contextMenuItem->text(COLUMN_TXHASH)); } // context menu action: lock coin void CoinControlDialog::lockCoin() { if (contextMenuItem->checkState(COLUMN_CHECKBOX) == Qt::Checked) contextMenuItem->setCheckState(COLUMN_CHECKBOX, Qt::Unchecked); COutPoint outpt(uint256(contextMenuItem->text(COLUMN_TXHASH).toStdString()), contextMenuItem->text(COLUMN_VOUT_INDEX).toUInt()); model->lockCoin(outpt); contextMenuItem->setDisabled(true); contextMenuItem->setIcon(COLUMN_CHECKBOX, QIcon(":/icons/lock_closed")); updateLabelLocked(); } // context menu action: unlock coin void CoinControlDialog::unlockCoin() { COutPoint outpt(uint256(contextMenuItem->text(COLUMN_TXHASH).toStdString()), contextMenuItem->text(COLUMN_VOUT_INDEX).toUInt()); model->unlockCoin(outpt); contextMenuItem->setDisabled(false); contextMenuItem->setIcon(COLUMN_CHECKBOX, QIcon()); updateLabelLocked(); } // copy label "Quantity" to clipboard void CoinControlDialog::clipboardQuantity() { GUIUtil::setClipboard(ui->labelCoinControlQuantity->text()); } // copy label "Amount" to clipboard void CoinControlDialog::clipboardAmount() { GUIUtil::setClipboard(ui->labelCoinControlAmount->text().left(ui->labelCoinControlAmount->text().indexOf(" "))); } // copy label "Fee" to clipboard void CoinControlDialog::clipboardFee() { GUIUtil::setClipboard(ui->labelCoinControlFee->text().left(ui->labelCoinControlFee->text().indexOf(" ")).replace("~", "")); } // copy label "After fee" to clipboard void CoinControlDialog::clipboardAfterFee() { GUIUtil::setClipboard(ui->labelCoinControlAfterFee->text().left(ui->labelCoinControlAfterFee->text().indexOf(" ")).replace("~", "")); } // copy label "Bytes" to clipboard void CoinControlDialog::clipboardBytes() { GUIUtil::setClipboard(ui->labelCoinControlBytes->text().replace("~", "")); } // copy label "Priority" to clipboard void CoinControlDialog::clipboardPriority() { GUIUtil::setClipboard(ui->labelCoinControlPriority->text()); } // copy label "Dust" to clipboard void CoinControlDialog::clipboardLowOutput() { GUIUtil::setClipboard(ui->labelCoinControlLowOutput->text()); } // copy label "Change" to clipboard void CoinControlDialog::clipboardChange() { GUIUtil::setClipboard(ui->labelCoinControlChange->text().left(ui->labelCoinControlChange->text().indexOf(" ")).replace("~", "")); } // treeview: sort void CoinControlDialog::sortView(int column, Qt::SortOrder order) { sortColumn = column; sortOrder = order; ui->treeWidget->sortItems(column, order); ui->treeWidget->header()->setSortIndicator(getMappedColumn(sortColumn), sortOrder); } // treeview: clicked on header void CoinControlDialog::headerSectionClicked(int logicalIndex) { if (logicalIndex == COLUMN_CHECKBOX) // click on most left column -> do nothing { ui->treeWidget->header()->setSortIndicator(getMappedColumn(sortColumn), sortOrder); } else { logicalIndex = getMappedColumn(logicalIndex, false); if (sortColumn == logicalIndex) sortOrder = ((sortOrder == Qt::AscendingOrder) ? Qt::DescendingOrder : Qt::AscendingOrder); else { sortColumn = logicalIndex; sortOrder = ((sortColumn == COLUMN_LABEL || sortColumn == COLUMN_ADDRESS) ? Qt::AscendingOrder : Qt::DescendingOrder); // if label or address then default => asc, else default => desc } sortView(sortColumn, sortOrder); } } // toggle tree mode void CoinControlDialog::radioTreeMode(bool checked) { if (checked && model) updateView(); } // toggle list mode void CoinControlDialog::radioListMode(bool checked) { if (checked && model) updateView(); } // checkbox clicked by user void CoinControlDialog::viewItemChanged(QTreeWidgetItem* item, int column) { if (column == COLUMN_CHECKBOX && item->text(COLUMN_TXHASH).length() == 64) // transaction hash is 64 characters (this means its a child node, so its not a parent node in tree mode) { COutPoint outpt(uint256(item->text(COLUMN_TXHASH).toStdString()), item->text(COLUMN_VOUT_INDEX).toUInt()); if (item->checkState(COLUMN_CHECKBOX) == Qt::Unchecked) coinControl->UnSelect(outpt); else if (item->isDisabled()) // locked (this happens if "check all" through parent node) item->setCheckState(COLUMN_CHECKBOX, Qt::Unchecked); else coinControl->Select(outpt); // selection changed -> update labels if (ui->treeWidget->isEnabled()){ // do not update on every click for (un)select all CoinControlDialog::updateLabels(model, this); updateDialogLabels(); } } // todo: this is a temporary qt5 fix: when clicking a parent node in tree mode, the parent node // including all childs are partially selected. But the parent node should be fully selected // as well as the childs. Childs should never be partially selected in the first place. // Please remove this ugly fix, once the bug is solved upstream. #if QT_VERSION >= 0x050000 else if (column == COLUMN_CHECKBOX && item->childCount() > 0) { if (item->checkState(COLUMN_CHECKBOX) == Qt::PartiallyChecked && item->child(0)->checkState(COLUMN_CHECKBOX) == Qt::PartiallyChecked) item->setCheckState(COLUMN_CHECKBOX, Qt::Checked); } #endif } // return human readable label for priority number QString CoinControlDialog::getPriorityLabel(double dPriority, double mempoolEstimatePriority) { double dPriorityMedium = mempoolEstimatePriority; if (dPriorityMedium <= 0) dPriorityMedium = AllowFreeThreshold(); // not enough data, back to hard-coded if (dPriority / 1000000 > dPriorityMedium) return tr("highest"); else if (dPriority / 100000 > dPriorityMedium) return tr("higher"); else if (dPriority / 10000 > dPriorityMedium) return tr("high"); else if (dPriority / 1000 > dPriorityMedium) return tr("medium-high"); else if (dPriority > dPriorityMedium) return tr("medium"); else if (dPriority * 10 > dPriorityMedium) return tr("low-medium"); else if (dPriority * 100 > dPriorityMedium) return tr("low"); else if (dPriority * 1000 > dPriorityMedium) return tr("lower"); else return tr("lowest"); } // shows count of locked unspent outputs void CoinControlDialog::updateLabelLocked() { vector<COutPoint> vOutpts; model->listLockedCoins(vOutpts); if (vOutpts.size() > 0) { ui->labelLocked->setText(tr("(%1 locked)").arg(vOutpts.size())); ui->labelLocked->setVisible(true); } else ui->labelLocked->setVisible(false); } void CoinControlDialog::updateDialogLabels() { if (this->parentWidget() == nullptr) { CoinControlDialog::updateLabels(model, this); return; } vector<COutPoint> vCoinControl; vector<COutput> vOutputs; coinControl->ListSelected(vCoinControl); model->getOutputs(vCoinControl, vOutputs); CAmount nAmount = 0; unsigned int nQuantity = 0; for (const COutput& out : vOutputs) { // unselect already spent, very unlikely scenario, this could happen // when selected are spent elsewhere, like rpc or another computer uint256 txhash = out.tx->GetHash(); COutPoint outpt(txhash, out.i); if(model->isSpent(outpt)) { coinControl->UnSelect(outpt); continue; } // Quantity nQuantity++; // Amount nAmount += out.tx->vout[out.i].nValue; } MultisigDialog* multisigDialog = (MultisigDialog*)this->parentWidget(); multisigDialog->updateCoinControl(nAmount, nQuantity); } void CoinControlDialog::updateLabels(WalletModel* model, QDialog* dialog) { if (!model) return; // nPayAmount CAmount nPayAmount = 0; bool fDust = false; CMutableTransaction txDummy; foreach (const CAmount& amount, CoinControlDialog::payAmounts) { nPayAmount += amount; if (amount > 0) { CTxOut txout(amount, (CScript)vector<unsigned char>(24, 0)); txDummy.vout.push_back(txout); if (txout.IsDust(::minRelayTxFee)) fDust = true; } } QString sPriorityLabel = tr("none"); CAmount nAmount = 0; CAmount nPayFee = 0; CAmount nAfterFee = 0; CAmount nChange = 0; unsigned int nBytes = 0; unsigned int nBytesInputs = 0; double dPriority = 0; double dPriorityInputs = 0; unsigned int nQuantity = 0; int nQuantityUncompressed = 0; bool fAllowFree = false; vector<COutPoint> vCoinControl; vector<COutput> vOutputs; coinControl->ListSelected(vCoinControl); model->getOutputs(vCoinControl, vOutputs); BOOST_FOREACH (const COutput& out, vOutputs) { // unselect already spent, very unlikely scenario, this could happen // when selected are spent elsewhere, like rpc or another computer uint256 txhash = out.tx->GetHash(); COutPoint outpt(txhash, out.i); if (model->isSpent(outpt)) { coinControl->UnSelect(outpt); continue; } // Quantity nQuantity++; // Amount nAmount += out.tx->vout[out.i].nValue; // Priority dPriorityInputs += (double)out.tx->vout[out.i].nValue * (out.nDepth + 1); // Bytes CTxDestination address; if (ExtractDestination(out.tx->vout[out.i].scriptPubKey, address)) { CPubKey pubkey; CKeyID* keyid = boost::get<CKeyID>(&address); if (keyid && model->getPubKey(*keyid, pubkey)) { nBytesInputs += (pubkey.IsCompressed() ? 148 : 180); if (!pubkey.IsCompressed()) nQuantityUncompressed++; } else nBytesInputs += 148; // in all error cases, simply assume 148 here } else nBytesInputs += 148; } // calculation if (nQuantity > 0) { // Bytes nBytes = nBytesInputs + ((CoinControlDialog::payAmounts.size() > 0 ? CoinControlDialog::payAmounts.size() + max(1, CoinControlDialog::nSplitBlockDummy) : 2) * 34) + 10; // always assume +1 output for change here // Priority double mempoolEstimatePriority = mempool.estimatePriority(nTxConfirmTarget); dPriority = dPriorityInputs / (nBytes - nBytesInputs + (nQuantityUncompressed * 29)); // 29 = 180 - 151 (uncompressed public keys are over the limit. max 151 bytes of the input are ignored for priority) sPriorityLabel = CoinControlDialog::getPriorityLabel(dPriority, mempoolEstimatePriority); // Fee nPayFee = CWallet::GetMinimumFee(nBytes, nTxConfirmTarget, mempool); // IX Fee if (coinControl->useSwiftTX) nPayFee = max(nPayFee, CENT); // Allow free? double dPriorityNeeded = mempoolEstimatePriority; if (dPriorityNeeded <= 0) dPriorityNeeded = AllowFreeThreshold(); // not enough data, back to hard-coded fAllowFree = (dPriority >= dPriorityNeeded); if (fSendFreeTransactions) if (fAllowFree && nBytes <= MAX_FREE_TRANSACTION_CREATE_SIZE) nPayFee = 0; if (nPayAmount > 0) { nChange = nAmount - nPayFee - nPayAmount; // Never create dust outputs; if we would, just add the dust to the fee. if (nChange > 0 && nChange < CENT) { CTxOut txout(nChange, (CScript)vector<unsigned char>(24, 0)); if (txout.IsDust(::minRelayTxFee)) { nPayFee += nChange; nChange = 0; } } if (nChange == 0) nBytes -= 34; } // after fee nAfterFee = nAmount - nPayFee; if (nAfterFee < 0) nAfterFee = 0; } // actually update labels int nDisplayUnit = BitcoinUnits::AGN; if (model && model->getOptionsModel()) nDisplayUnit = model->getOptionsModel()->getDisplayUnit(); QLabel* l1 = dialog->findChild<QLabel*>("labelCoinControlQuantity"); QLabel* l2 = dialog->findChild<QLabel*>("labelCoinControlAmount"); QLabel* l3 = dialog->findChild<QLabel*>("labelCoinControlFee"); QLabel* l4 = dialog->findChild<QLabel*>("labelCoinControlAfterFee"); QLabel* l5 = dialog->findChild<QLabel*>("labelCoinControlBytes"); QLabel* l6 = dialog->findChild<QLabel*>("labelCoinControlPriority"); QLabel* l7 = dialog->findChild<QLabel*>("labelCoinControlLowOutput"); QLabel* l8 = dialog->findChild<QLabel*>("labelCoinControlChange"); // enable/disable "dust" and "change" dialog->findChild<QLabel*>("labelCoinControlLowOutputText")->setEnabled(nPayAmount > 0); dialog->findChild<QLabel*>("labelCoinControlLowOutput")->setEnabled(nPayAmount > 0); dialog->findChild<QLabel*>("labelCoinControlChangeText")->setEnabled(nPayAmount > 0); dialog->findChild<QLabel*>("labelCoinControlChange")->setEnabled(nPayAmount > 0); // stats l1->setText(QString::number(nQuantity)); // Quantity l2->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, nAmount)); // Amount l3->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, nPayFee)); // Fee l4->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, nAfterFee)); // After Fee l5->setText(((nBytes > 0) ? "~" : "") + QString::number(nBytes)); // Bytes l6->setText(sPriorityLabel); // Priority l7->setText(fDust ? tr("yes") : tr("no")); // Dust l8->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, nChange)); // Change if (nPayFee > 0 && !(payTxFee.GetFeePerK() > 0 && fPayAtLeastCustomFee && nBytes < 1000)) { l3->setText("~" + l3->text()); l4->setText("~" + l4->text()); if (nChange > 0) l8->setText("~" + l8->text()); } // turn labels "red" l5->setStyleSheet((nBytes >= MAX_FREE_TRANSACTION_CREATE_SIZE) ? "color:red;" : ""); // Bytes >= 1000 l6->setStyleSheet((dPriority > 0 && !fAllowFree) ? "color:red;" : ""); // Priority < "medium" l7->setStyleSheet((fDust) ? "color:red;" : ""); // Dust = "yes" // tool tips QString toolTip1 = tr("This label turns red, if the transaction size is greater than 1000 bytes.") + "<br /><br />"; toolTip1 += tr("This means a fee of at least %1 per kB is required.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CWallet::minTxFee.GetFeePerK())) + "<br /><br />"; toolTip1 += tr("Can vary +/- 1 byte per input."); QString toolTip2 = tr("Transactions with higher priority are more likely to get included into a block.") + "<br /><br />"; toolTip2 += tr("This label turns red, if the priority is smaller than \"medium\".") + "<br /><br />"; toolTip2 += tr("This means a fee of at least %1 per kB is required.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CWallet::minTxFee.GetFeePerK())); QString toolTip3 = tr("This label turns red, if any recipient receives an amount smaller than %1.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, ::minRelayTxFee.GetFee(546))); // how many satoshis the estimated fee can vary per byte we guess wrong double dFeeVary; if (payTxFee.GetFeePerK() > 0) dFeeVary = (double)std::max(CWallet::minTxFee.GetFeePerK(), payTxFee.GetFeePerK()) / 1000; else dFeeVary = (double)std::max(CWallet::minTxFee.GetFeePerK(), mempool.estimateFee(nTxConfirmTarget).GetFeePerK()) / 1000; QString toolTip4 = tr("Can vary +/- %1 duff(s) per input.").arg(dFeeVary); l3->setToolTip(toolTip4); l4->setToolTip(toolTip4); l5->setToolTip(toolTip1); l6->setToolTip(toolTip2); l7->setToolTip(toolTip3); l8->setToolTip(toolTip4); dialog->findChild<QLabel*>("labelCoinControlFeeText")->setToolTip(l3->toolTip()); dialog->findChild<QLabel*>("labelCoinControlAfterFeeText")->setToolTip(l4->toolTip()); dialog->findChild<QLabel*>("labelCoinControlBytesText")->setToolTip(l5->toolTip()); dialog->findChild<QLabel*>("labelCoinControlPriorityText")->setToolTip(l6->toolTip()); dialog->findChild<QLabel*>("labelCoinControlLowOutputText")->setToolTip(l7->toolTip()); dialog->findChild<QLabel*>("labelCoinControlChangeText")->setToolTip(l8->toolTip()); // Insufficient funds QLabel* label = dialog->findChild<QLabel*>("labelCoinControlInsuffFunds"); if (label) label->setVisible(nChange < 0); } void CoinControlDialog::updateView() { if (!model || !model->getOptionsModel() || !model->getAddressTableModel()) return; bool treeMode = ui->radioTreeMode->isChecked(); ui->treeWidget->clear(); ui->treeWidget->setEnabled(false); // performance, otherwise updateLabels would be called for every checked checkbox ui->treeWidget->setAlternatingRowColors(!treeMode); QFlags<Qt::ItemFlag> flgCheckbox = Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsUserCheckable; QFlags<Qt::ItemFlag> flgTristate = Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsUserCheckable | Qt::ItemIsTristate; int nDisplayUnit = model->getOptionsModel()->getDisplayUnit(); double mempoolEstimatePriority = mempool.estimatePriority(nTxConfirmTarget); map<QString, vector<COutput>> mapCoins; model->listCoins(mapCoins); BOOST_FOREACH (PAIRTYPE(QString, vector<COutput>) coins, mapCoins) { QTreeWidgetItem* itemWalletAddress = new QTreeWidgetItem(); itemWalletAddress->setCheckState(COLUMN_CHECKBOX, Qt::Unchecked); QString sWalletAddress = coins.first; QString sWalletLabel = model->getAddressTableModel()->labelForAddress(sWalletAddress); if (sWalletLabel.isEmpty()) sWalletLabel = tr("(no label)"); if (treeMode) { // wallet address ui->treeWidget->addTopLevelItem(itemWalletAddress); itemWalletAddress->setFlags(flgTristate); itemWalletAddress->setCheckState(COLUMN_CHECKBOX, Qt::Unchecked); // label itemWalletAddress->setText(COLUMN_LABEL, sWalletLabel); itemWalletAddress->setToolTip(COLUMN_LABEL, sWalletLabel); // address itemWalletAddress->setText(COLUMN_ADDRESS, sWalletAddress); itemWalletAddress->setToolTip(COLUMN_ADDRESS, sWalletAddress); } CAmount nSum = 0; double dPrioritySum = 0; int nChildren = 0; int nInputSum = 0; for(const COutput& out: coins.second) { isminetype mine = pwalletMain->IsMine(out.tx->vout[out.i]); bool fMultiSigUTXO = (mine & ISMINE_MULTISIG); // when multisig is enabled, it will only display outputs from multisig addresses if (fMultisigEnabled && !fMultiSigUTXO) continue; int nInputSize = 0; nSum += out.tx->vout[out.i].nValue; nChildren++; QTreeWidgetItem* itemOutput; if (treeMode) itemOutput = new QTreeWidgetItem(itemWalletAddress); else itemOutput = new QTreeWidgetItem(ui->treeWidget); itemOutput->setFlags(flgCheckbox); itemOutput->setCheckState(COLUMN_CHECKBOX, Qt::Unchecked); //MultiSig if (fMultiSigUTXO) { itemOutput->setText(COLUMN_TYPE, "MultiSig"); if (!fMultisigEnabled) { COutPoint outpt(out.tx->GetHash(), out.i); coinControl->UnSelect(outpt); // just to be sure itemOutput->setDisabled(true); itemOutput->setIcon(COLUMN_CHECKBOX, QIcon(":/icons/lock_closed")); } } else { itemOutput->setText(COLUMN_TYPE, "Personal"); } // address CTxDestination outputAddress; QString sAddress = ""; if (ExtractDestination(out.tx->vout[out.i].scriptPubKey, outputAddress)) { sAddress = QString::fromStdString(CBitcoinAddress(outputAddress).ToString()); // if listMode or change => show Agon address. In tree mode, address is not shown again for direct wallet address outputs if (!treeMode || (!(sAddress == sWalletAddress))) itemOutput->setText(COLUMN_ADDRESS, sAddress); itemOutput->setToolTip(COLUMN_ADDRESS, sAddress); CPubKey pubkey; CKeyID* keyid = boost::get<CKeyID>(&outputAddress); if (keyid && model->getPubKey(*keyid, pubkey) && !pubkey.IsCompressed()) nInputSize = 29; // 29 = 180 - 151 (public key is 180 bytes, priority free area is 151 bytes) } // label if (!(sAddress == sWalletAddress)) // change { // tooltip from where the change comes from itemOutput->setToolTip(COLUMN_LABEL, tr("change from %1 (%2)").arg(sWalletLabel).arg(sWalletAddress)); itemOutput->setText(COLUMN_LABEL, tr("(change)")); } else if (!treeMode) { QString sLabel = model->getAddressTableModel()->labelForAddress(sAddress); if (sLabel.isEmpty()) sLabel = tr("(no label)"); itemOutput->setText(COLUMN_LABEL, sLabel); } // amount itemOutput->setText(COLUMN_AMOUNT, BitcoinUnits::format(nDisplayUnit, out.tx->vout[out.i].nValue)); itemOutput->setToolTip(COLUMN_AMOUNT, BitcoinUnits::format(nDisplayUnit, out.tx->vout[out.i].nValue)); itemOutput->setText(COLUMN_AMOUNT_INT64, strPad(QString::number(out.tx->vout[out.i].nValue), 15, " ")); // padding so that sorting works correctly // date itemOutput->setText(COLUMN_DATE, GUIUtil::dateTimeStr(out.tx->GetTxTime())); itemOutput->setToolTip(COLUMN_DATE, GUIUtil::dateTimeStr(out.tx->GetTxTime())); itemOutput->setText(COLUMN_DATE_INT64, strPad(QString::number(out.tx->GetTxTime()), 20, " ")); // confirmations itemOutput->setText(COLUMN_CONFIRMATIONS, strPad(QString::number(out.nDepth), 8, " ")); // priority double dPriority = ((double)out.tx->vout[out.i].nValue / (nInputSize + 78)) * (out.nDepth + 1); // 78 = 2 * 34 + 10 itemOutput->setText(COLUMN_PRIORITY, CoinControlDialog::getPriorityLabel(dPriority, mempoolEstimatePriority)); itemOutput->setText(COLUMN_PRIORITY_INT64, strPad(QString::number((int64_t)dPriority), 20, " ")); dPrioritySum += (double)out.tx->vout[out.i].nValue * (out.nDepth + 1); nInputSum += nInputSize; // transaction hash uint256 txhash = out.tx->GetHash(); itemOutput->setText(COLUMN_TXHASH, QString::fromStdString(txhash.GetHex())); // vout index itemOutput->setText(COLUMN_VOUT_INDEX, QString::number(out.i)); // disable locked coins if (model->isLockedCoin(txhash, out.i)) { COutPoint outpt(txhash, out.i); coinControl->UnSelect(outpt); // just to be sure itemOutput->setDisabled(true); itemOutput->setIcon(COLUMN_CHECKBOX, QIcon(":/icons/lock_closed")); } // set checkbox if (coinControl->IsSelected(txhash, out.i)) itemOutput->setCheckState(COLUMN_CHECKBOX, Qt::Checked); } // amount if (treeMode) { dPrioritySum = dPrioritySum / (nInputSum + 78); itemWalletAddress->setText(COLUMN_CHECKBOX, "(" + QString::number(nChildren) + ")"); itemWalletAddress->setText(COLUMN_AMOUNT, BitcoinUnits::format(nDisplayUnit, nSum)); itemWalletAddress->setToolTip(COLUMN_AMOUNT, BitcoinUnits::format(nDisplayUnit, nSum)); itemWalletAddress->setText(COLUMN_AMOUNT_INT64, strPad(QString::number(nSum), 15, " ")); itemWalletAddress->setText(COLUMN_PRIORITY, CoinControlDialog::getPriorityLabel(dPrioritySum, mempoolEstimatePriority)); itemWalletAddress->setText(COLUMN_PRIORITY_INT64, strPad(QString::number((int64_t)dPrioritySum), 20, " ")); } } // expand all partially selected if (treeMode) { for (int i = 0; i < ui->treeWidget->topLevelItemCount(); i++) if (ui->treeWidget->topLevelItem(i)->checkState(COLUMN_CHECKBOX) == Qt::PartiallyChecked) ui->treeWidget->topLevelItem(i)->setExpanded(true); } // sort view sortView(sortColumn, sortOrder); ui->treeWidget->setEnabled(true); }
[ "45319613+devo2018@users.noreply.github.com" ]
45319613+devo2018@users.noreply.github.com
a01af1b9a3d426fdf218e3c4f895006c16d89f8e
0c35fe23383ede23fd45154a5b2b5d48be6694ba
/geeksforgeeks/backtracking/knights_tour.cpp
275da7a5dcbfa9ed5f9ed995aeac8780f3943287
[]
no_license
ravindra1001/DSA
f20096663b6cd2eeb88014ddd81933badcc2e96c
7bfc14f07fcf3059dc38f2bc18379ae9521faec2
refs/heads/master
2021-05-09T15:48:26.523952
2018-06-24T18:47:10
2018-06-24T18:47:10
119,101,526
0
0
null
2018-06-24T18:47:11
2018-01-26T20:47:32
C++
UTF-8
C++
false
false
1,927
cpp
#include <bits/stdc++.h> using namespace std; int N = 8; void print_grid(const vector<vector<int> >&grid){ for(int i=0;i<N;i++){ for(int j=0;j<N;j++){ cout<<grid[i][j]<<" "; } cout<<endl; } } bool is_valid_move(const vector<vector<int> > &grid, int next_x, int next_y){ if(next_x >= 0 && next_x < N && next_y>=0 && next_y <N && grid[next_x][next_y] == -1 ) return true; return false; } bool utility_knights_tour(vector<vector<int> > &grid, int current_x, int current_y, int count, const vector<pair<int, int> >&moves){ if(count==N*N){ return true; } for(int i=0; i<moves.size();i++){ int next_x = current_x + moves[i].first; int next_y = current_y + moves[i].second; if(is_valid_move(grid, next_x, next_y)){ grid[next_x][next_y] = count; if(utility_knights_tour(grid, next_x, next_y, count+1, moves)==true){ return true; } else{ grid[next_x][next_y] = -1; } } } return false; } void knights_tour(){ vector<vector<int> >grid(N, vector<int>(N, -1)); vector<pair<int, int> >moves = {make_pair(2,1), make_pair(1,2), make_pair(-1,2), make_pair(-2,1), make_pair(-2,-1), make_pair(-1,-2), make_pair(1,-2), make_pair(2,-1)}; grid[0][0] = 0; int current_x = 0; int current_y = 0; int count = 1; if(utility_knights_tour(grid, current_x, current_y, count, moves)==true){ print_grid(grid); } else{ cout<<"solution does not exist"<<endl; } } int main(){ knights_tour(); return 0; }
[ "ravindra.saini1001@gmail.com" ]
ravindra.saini1001@gmail.com
3532b47cab93553d68f7ed06945a7c26b79b80b1
04251e142abab46720229970dab4f7060456d361
/lib/rosetta/source/src/core/scoring/nmr/rdc/RDCData.hh
f4d50507521f0352ede5f39ff34101020de1ee05
[]
no_license
sailfish009/binding_affinity_calculator
216257449a627d196709f9743ca58d8764043f12
7af9ce221519e373aa823dadc2005de7a377670d
refs/heads/master
2022-12-29T11:15:45.164881
2020-10-22T09:35:32
2020-10-22T09:35:32
null
0
0
null
null
null
null
UTF-8
C++
false
false
3,105
hh
// -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*- // vi: set ts=2 noet: // // (c) Copyright Rosetta Commons Member Institutions. // (c) This file is part of the Rosetta software suite and is made available under license. // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons. // (c) For more information, see http://www.rosettacommons.org. Questions about this can be // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu. /// @file core/scoring/nmr/rdc/RDCData.hh /// @brief class that stores and handles all RDC data for all alignment media and experiments /// @details last Modified: 07/31/16 /// @author Georg Kuenze (georg.kuenze@vanderbilt.edu) #ifndef INCLUDED_core_scoring_nmr_rdc_RDCData_HH #define INCLUDED_core_scoring_nmr_rdc_RDCData_HH // Unit headers #include <core/scoring/nmr/rdc/RDCData.fwd.hh> // Package headers #include <core/scoring/nmr/NMRDataFactory.fwd.hh> #include <core/scoring/nmr/rdc/RDCMultiSet.fwd.hh> #include <core/scoring/nmr/rdc/RDCSingleSet.fwd.hh> #include <core/scoring/nmr/rdc/RDCTensor.fwd.hh> // Project headers #include <basic/datacache/CacheableData.hh> #include <core/pose/Pose.fwd.hh> #include <core/types.hh> // Basic headers #include <basic/Tracer.fwd.hh> // Utility headers #include <utility/vector1.hh> // C++ headers #include <iosfwd> #include <string> #include <algorithm> namespace core { namespace scoring { namespace nmr { namespace rdc { class RDCData : public basic::datacache::CacheableData { public: // Methods /// @brief construct from filename RDCData( std::string const & filename, pose::Pose const & pose ); /// @brief copy constructor RDCData(RDCData const & other); /// @brief assignment operator RDCData & operator=(RDCData const & rhs); /// @brief destructor ~RDCData() override; basic::datacache::CacheableDataOP clone() const override; /// @brief compute the overall RDC score and scores for the individual alignment media Real compute_score_all_media( pose::Pose const & pose, utility::vector1<Real> & scores_all_media, utility::vector1< RDCTensorCOP > & tensors_all_media ); // Getters utility::vector1< RDCMultiSetOP > & get_rdc_multiset_vec() { return rdc_multiset_vec_; } utility::vector1< RDCMultiSetOP > const & get_rdc_multiset_vec() const { return rdc_multiset_vec_; } Size get_number_alignment_media() const { return number_alignment_media_; } Size get_total_number_rdc() const; void show(std::ostream & TR) const; private: // Methods /// @brief default constructor RDCData(); /// @brief register options void register_options(); /// @brief utility function used during construction of RDCData object void init_rdc_data_from_file( std::string const & filename, pose::Pose const & pose ); private: // Data utility::vector1< RDCMultiSetOP > rdc_multiset_vec_; Size number_alignment_media_; }; } // namespace rdc } // namespace nmr } // namespace scoring } // namespace core #endif // INCLUDED_core_scoring_nmr_rdc_RDCData_HH
[ "lzhangbk@connect.ust.hk" ]
lzhangbk@connect.ust.hk
5f09442a8cd836727b30089a85c097c45bd43922
3e8f16e18eb953456ca399192ea8c54c1a218376
/src/cl_dll/Vectors.h
dc708d6afea6c06c4dc480a61bf62355057792de
[]
no_license
maxvollmer/Half-Life-VR
6437ffb3f6b098c0387b70c6e674572d94c0f190
f05957aa919765a1f53e54f3727e2c64ac1ec65f
refs/heads/main
2023-05-14T02:29:24.136125
2023-05-07T19:48:18
2023-05-07T19:48:18
102,905,323
241
42
null
2023-05-07T19:48:19
2017-09-08T21:19:41
C++
UTF-8
C++
false
false
17,748
h
/////////////////////////////////////////////////////////////////////////////// // Vectors.h // ========= // 2D/3D/4D vectors // // AUTHOR: Song Ho Ahn (song.ahn@gmail.com) // CREATED: 2007-02-14 // UPDATED: 2013-01-20 // // Copyright (C) 2007-2013 Song Ho Ahn /////////////////////////////////////////////////////////////////////////////// #ifndef VECTORS_H_DEF #define VECTORS_H_DEF #include <cmath> #include <iostream> /////////////////////////////////////////////////////////////////////////////// // 2D vector /////////////////////////////////////////////////////////////////////////////// struct Vector2 { float x = 0.f; float y = 0.f; // ctors Vector2() : x(0), y(0) {}; Vector2(float x, float y) : x(x), y(y) {}; // utils functions void set(float x, float y); float length() const; // float distance(const Vector2& vec) const; // distance between two vectors Vector2& normalize(); // float dot(const Vector2& vec) const; // dot product bool equal(const Vector2& vec, float e) const; // compare with epsilon // operators Vector2 operator-() const; // unary operator (negate) Vector2 operator+(const Vector2& rhs) const; // add rhs Vector2 operator-(const Vector2& rhs) const; // subtract rhs Vector2& operator+=(const Vector2& rhs); // add rhs and update this object Vector2& operator-=(const Vector2& rhs); // subtract rhs and update this object Vector2 operator*(const float scale) const; // scale Vector2 operator*(const Vector2& rhs) const; // multiply each element Vector2& operator*=(const float scale); // scale and update this object Vector2& operator*=(const Vector2& rhs); // multiply each element and update this object Vector2 operator/(const float scale) const; // inverse scale Vector2& operator/=(const float scale); // scale and update this object bool operator==(const Vector2& rhs) const; // exact compare, no epsilon bool operator!=(const Vector2& rhs) const; // exact compare, no epsilon bool operator<(const Vector2& rhs) const; // comparison for sort float operator[](int index) const; // subscript operator v[0], v[1] float& operator[](int index); // subscript operator v[0], v[1] friend Vector2 operator*(const float a, const Vector2 vec); friend std::ostream& operator<<(std::ostream& os, const Vector2& vec); }; /////////////////////////////////////////////////////////////////////////////// // 3D vector /////////////////////////////////////////////////////////////////////////////// struct Vector3 { float x = 0.f; float y = 0.f; float z = 0.f; // ctors Vector3() : x(0), y(0), z(0) {}; Vector3(float x, float y, float z) : x(x), y(y), z(z) {}; // utils functions void set(float x, float y, float z); float length() const; // float distance(const Vector3& vec) const; // distance between two vectors Vector3& normalize(); // float dot(const Vector3& vec) const; // dot product Vector3 cross(const Vector3& vec) const; // cross product bool equal(const Vector3& vec, float e) const; // compare with epsilon // operators Vector3 operator-() const; // unary operator (negate) Vector3 operator+(const Vector3& rhs) const; // add rhs Vector3 operator-(const Vector3& rhs) const; // subtract rhs Vector3& operator+=(const Vector3& rhs); // add rhs and update this object Vector3& operator-=(const Vector3& rhs); // subtract rhs and update this object Vector3 operator*(const float scale) const; // scale Vector3 operator*(const Vector3& rhs) const; // multiplay each element Vector3& operator*=(const float scale); // scale and update this object Vector3& operator*=(const Vector3& rhs); // product each element and update this object Vector3 operator/(const float scale) const; // inverse scale Vector3& operator/=(const float scale); // scale and update this object bool operator==(const Vector3& rhs) const; // exact compare, no epsilon bool operator!=(const Vector3& rhs) const; // exact compare, no epsilon bool operator<(const Vector3& rhs) const; // comparison for sort float operator[](int index) const; // subscript operator v[0], v[1] float& operator[](int index); // subscript operator v[0], v[1] friend Vector3 operator*(const float a, const Vector3 vec); friend std::ostream& operator<<(std::ostream& os, const Vector3& vec); }; /////////////////////////////////////////////////////////////////////////////// // 4D vector /////////////////////////////////////////////////////////////////////////////// struct Vector4 { float x = 0.f; float y = 0.f; float z = 0.f; float w = 0.f; // ctors Vector4() : x(0), y(0), z(0), w(0) {}; Vector4(float x, float y, float z, float w) : x(x), y(y), z(z), w(w) {}; // utils functions void set(float x, float y, float z, float w); float length() const; // float distance(const Vector4& vec) const; // distance between two vectors Vector4& normalize(); // float dot(const Vector4& vec) const; // dot product bool equal(const Vector4& vec, float e) const; // compare with epsilon // operators Vector4 operator-() const; // unary operator (negate) Vector4 operator+(const Vector4& rhs) const; // add rhs Vector4 operator-(const Vector4& rhs) const; // subtract rhs Vector4& operator+=(const Vector4& rhs); // add rhs and update this object Vector4& operator-=(const Vector4& rhs); // subtract rhs and update this object Vector4 operator*(const float scale) const; // scale Vector4 operator*(const Vector4& rhs) const; // multiply each element Vector4& operator*=(const float scale); // scale and update this object Vector4& operator*=(const Vector4& rhs); // multiply each element and update this object Vector4 operator/(const float scale) const; // inverse scale Vector4& operator/=(const float scale); // scale and update this object bool operator==(const Vector4& rhs) const; // exact compare, no epsilon bool operator!=(const Vector4& rhs) const; // exact compare, no epsilon bool operator<(const Vector4& rhs) const; // comparison for sort float operator[](int index) const; // subscript operator v[0], v[1] float& operator[](int index); // subscript operator v[0], v[1] friend Vector4 operator*(const float a, const Vector4 vec); friend std::ostream& operator<<(std::ostream& os, const Vector4& vec); }; // fast math routines from Doom3 SDK inline float invSqrt(float x) { float xhalf = 0.5f * x; int i = *(int*)&x; // get bits for floating value i = 0x5f3759df - (i >> 1); // gives initial guess x = *(float*)&i; // convert bits back to float x = x * (1.5f - xhalf * x * x); // Newton step return x; } /////////////////////////////////////////////////////////////////////////////// // inline functions for Vector2 /////////////////////////////////////////////////////////////////////////////// inline Vector2 Vector2::operator-() const { return Vector2(-x, -y); } inline Vector2 Vector2::operator+(const Vector2& rhs) const { return Vector2(x + rhs.x, y + rhs.y); } inline Vector2 Vector2::operator-(const Vector2& rhs) const { return Vector2(x - rhs.x, y - rhs.y); } inline Vector2& Vector2::operator+=(const Vector2& rhs) { x += rhs.x; y += rhs.y; return *this; } inline Vector2& Vector2::operator-=(const Vector2& rhs) { x -= rhs.x; y -= rhs.y; return *this; } inline Vector2 Vector2::operator*(const float a) const { return Vector2(x * a, y * a); } inline Vector2 Vector2::operator*(const Vector2& rhs) const { return Vector2(x * rhs.x, y * rhs.y); } inline Vector2& Vector2::operator*=(const float a) { x *= a; y *= a; return *this; } inline Vector2& Vector2::operator*=(const Vector2& rhs) { x *= rhs.x; y *= rhs.y; return *this; } inline Vector2 Vector2::operator/(const float a) const { return Vector2(x / a, y / a); } inline Vector2& Vector2::operator/=(const float a) { x /= a; y /= a; return *this; } inline bool Vector2::operator==(const Vector2& rhs) const { return (x == rhs.x) && (y == rhs.y); } inline bool Vector2::operator!=(const Vector2& rhs) const { return (x != rhs.x) || (y != rhs.y); } inline bool Vector2::operator<(const Vector2& rhs) const { if (x < rhs.x) return true; if (x > rhs.x) return false; if (y < rhs.y) return true; if (y > rhs.y) return false; return false; } inline float Vector2::operator[](int index) const { return (&x)[index]; } inline float& Vector2::operator[](int index) { return (&x)[index]; } inline void Vector2::set(float x, float y) { this->x = x; this->y = y; } inline float Vector2::length() const { return sqrtf(x * x + y * y); } inline float Vector2::distance(const Vector2& vec) const { return sqrtf((vec.x - x) * (vec.x - x) + (vec.y - y) * (vec.y - y)); } inline Vector2& Vector2::normalize() { //@@const float EPSILON = 0.000001f; float xxyy = x * x + y * y; //@@if(xxyy < EPSILON) //@@ return *this; //float invLength = invSqrt(xxyy); float invLength = 1.0f / sqrtf(xxyy); x *= invLength; y *= invLength; return *this; } inline float Vector2::dot(const Vector2& rhs) const { return (x * rhs.x + y * rhs.y); } inline bool Vector2::equal(const Vector2& rhs, float epsilon) const { return fabs(x - rhs.x) < epsilon && fabs(y - rhs.y) < epsilon; } inline Vector2 operator*(const float a, const Vector2 vec) { return Vector2(a * vec.x, a * vec.y); } inline std::ostream& operator<<(std::ostream& os, const Vector2& vec) { os << "(" << vec.x << ", " << vec.y << ")"; return os; } // END OF VECTOR2 ///////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// // inline functions for Vector3 /////////////////////////////////////////////////////////////////////////////// inline Vector3 Vector3::operator-() const { return Vector3(-x, -y, -z); } inline Vector3 Vector3::operator+(const Vector3& rhs) const { return Vector3(x + rhs.x, y + rhs.y, z + rhs.z); } inline Vector3 Vector3::operator-(const Vector3& rhs) const { return Vector3(x - rhs.x, y - rhs.y, z - rhs.z); } inline Vector3& Vector3::operator+=(const Vector3& rhs) { x += rhs.x; y += rhs.y; z += rhs.z; return *this; } inline Vector3& Vector3::operator-=(const Vector3& rhs) { x -= rhs.x; y -= rhs.y; z -= rhs.z; return *this; } inline Vector3 Vector3::operator*(const float a) const { return Vector3(x * a, y * a, z * a); } inline Vector3 Vector3::operator*(const Vector3& rhs) const { return Vector3(x * rhs.x, y * rhs.y, z * rhs.z); } inline Vector3& Vector3::operator*=(const float a) { x *= a; y *= a; z *= a; return *this; } inline Vector3& Vector3::operator*=(const Vector3& rhs) { x *= rhs.x; y *= rhs.y; z *= rhs.z; return *this; } inline Vector3 Vector3::operator/(const float a) const { return Vector3(x / a, y / a, z / a); } inline Vector3& Vector3::operator/=(const float a) { x /= a; y /= a; z /= a; return *this; } inline bool Vector3::operator==(const Vector3& rhs) const { return (x == rhs.x) && (y == rhs.y) && (z == rhs.z); } inline bool Vector3::operator!=(const Vector3& rhs) const { return (x != rhs.x) || (y != rhs.y) || (z != rhs.z); } inline bool Vector3::operator<(const Vector3& rhs) const { if (x < rhs.x) return true; if (x > rhs.x) return false; if (y < rhs.y) return true; if (y > rhs.y) return false; if (z < rhs.z) return true; if (z > rhs.z) return false; return false; } inline float Vector3::operator[](int index) const { return (&x)[index]; } inline float& Vector3::operator[](int index) { return (&x)[index]; } inline void Vector3::set(float x, float y, float z) { this->x = x; this->y = y; this->z = z; } inline float Vector3::length() const { return sqrtf(x * x + y * y + z * z); } inline float Vector3::distance(const Vector3& vec) const { return sqrtf((vec.x - x) * (vec.x - x) + (vec.y - y) * (vec.y - y) + (vec.z - z) * (vec.z - z)); } inline Vector3& Vector3::normalize() { //@@const float EPSILON = 0.000001f; float xxyyzz = x * x + y * y + z * z; //@@if(xxyyzz < EPSILON) //@@ return *this; // do nothing if it is ~zero vector //float invLength = invSqrt(xxyyzz); float invLength = 1.0f / sqrtf(xxyyzz); x *= invLength; y *= invLength; z *= invLength; return *this; } inline float Vector3::dot(const Vector3& rhs) const { return (x * rhs.x + y * rhs.y + z * rhs.z); } inline Vector3 Vector3::cross(const Vector3& rhs) const { return Vector3(y * rhs.z - z * rhs.y, z * rhs.x - x * rhs.z, x * rhs.y - y * rhs.x); } inline bool Vector3::equal(const Vector3& rhs, float epsilon) const { return fabs(x - rhs.x) < epsilon && fabs(y - rhs.y) < epsilon && fabs(z - rhs.z) < epsilon; } inline Vector3 operator*(const float a, const Vector3 vec) { return Vector3(a * vec.x, a * vec.y, a * vec.z); } inline std::ostream& operator<<(std::ostream& os, const Vector3& vec) { os << "(" << vec.x << ", " << vec.y << ", " << vec.z << ")"; return os; } // END OF VECTOR3 ///////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// // inline functions for Vector4 /////////////////////////////////////////////////////////////////////////////// inline Vector4 Vector4::operator-() const { return Vector4(-x, -y, -z, -w); } inline Vector4 Vector4::operator+(const Vector4& rhs) const { return Vector4(x + rhs.x, y + rhs.y, z + rhs.z, w + rhs.w); } inline Vector4 Vector4::operator-(const Vector4& rhs) const { return Vector4(x - rhs.x, y - rhs.y, z - rhs.z, w - rhs.w); } inline Vector4& Vector4::operator+=(const Vector4& rhs) { x += rhs.x; y += rhs.y; z += rhs.z; w += rhs.w; return *this; } inline Vector4& Vector4::operator-=(const Vector4& rhs) { x -= rhs.x; y -= rhs.y; z -= rhs.z; w -= rhs.w; return *this; } inline Vector4 Vector4::operator*(const float a) const { return Vector4(x * a, y * a, z * a, w * a); } inline Vector4 Vector4::operator*(const Vector4& rhs) const { return Vector4(x * rhs.x, y * rhs.y, z * rhs.z, w * rhs.w); } inline Vector4& Vector4::operator*=(const float a) { x *= a; y *= a; z *= a; w *= a; return *this; } inline Vector4& Vector4::operator*=(const Vector4& rhs) { x *= rhs.x; y *= rhs.y; z *= rhs.z; w *= rhs.w; return *this; } inline Vector4 Vector4::operator/(const float a) const { return Vector4(x / a, y / a, z / a, w / a); } inline Vector4& Vector4::operator/=(const float a) { x /= a; y /= a; z /= a; w /= a; return *this; } inline bool Vector4::operator==(const Vector4& rhs) const { return (x == rhs.x) && (y == rhs.y) && (z == rhs.z) && (w == rhs.w); } inline bool Vector4::operator!=(const Vector4& rhs) const { return (x != rhs.x) || (y != rhs.y) || (z != rhs.z) || (w != rhs.w); } inline bool Vector4::operator<(const Vector4& rhs) const { if (x < rhs.x) return true; if (x > rhs.x) return false; if (y < rhs.y) return true; if (y > rhs.y) return false; if (z < rhs.z) return true; if (z > rhs.z) return false; if (w < rhs.w) return true; if (w > rhs.w) return false; return false; } inline float Vector4::operator[](int index) const { return (&x)[index]; } inline float& Vector4::operator[](int index) { return (&x)[index]; } inline void Vector4::set(float x, float y, float z, float w) { this->x = x; this->y = y; this->z = z; this->w = w; } inline float Vector4::length() const { return sqrtf(x * x + y * y + z * z + w * w); } inline float Vector4::distance(const Vector4& vec) const { return sqrtf((vec.x - x) * (vec.x - x) + (vec.y - y) * (vec.y - y) + (vec.z - z) * (vec.z - z) + (vec.w - w) * (vec.w - w)); } inline Vector4& Vector4::normalize() { //NOTE: leave w-component untouched //@@const float EPSILON = 0.000001f; float xxyyzz = x * x + y * y + z * z; //@@if(xxyyzz < EPSILON) //@@ return *this; // do nothing if it is zero vector //float invLength = invSqrt(xxyyzz); float invLength = 1.0f / sqrtf(xxyyzz); x *= invLength; y *= invLength; z *= invLength; return *this; } inline float Vector4::dot(const Vector4& rhs) const { return (x * rhs.x + y * rhs.y + z * rhs.z + w * rhs.w); } inline bool Vector4::equal(const Vector4& rhs, float epsilon) const { return fabs(x - rhs.x) < epsilon && fabs(y - rhs.y) < epsilon && fabs(z - rhs.z) < epsilon && fabs(w - rhs.w) < epsilon; } inline Vector4 operator*(const float a, const Vector4 vec) { return Vector4(a * vec.x, a * vec.y, a * vec.z, a * vec.w); } inline std::ostream& operator<<(std::ostream& os, const Vector4& vec) { os << "(" << vec.x << ", " << vec.y << ", " << vec.z << ", " << vec.w << ")"; return os; } // END OF VECTOR4 ///////////////////////////////////////////////////////////// #endif
[ "maxvollmer@users.noreply.github.com" ]
maxvollmer@users.noreply.github.com
fcfd45c667ca318ca9366c37b318bf7a7f7594d0
07e106e87ad2191753f7914a9b713f9040fbaf86
/main.cpp
c5c66b5cf43d3a9509855fa93ae4863684e6cd1b
[]
no_license
tdtrung17693/qboy
a133eb595363294a6f26c2cfdfc1f9230d84faea
53fc2f0daad81aa29cb9295f1fcaacda22d044e0
refs/heads/master
2021-03-04T18:48:57.861655
2020-03-09T14:27:25
2020-03-09T14:27:25
246,056,960
0
0
null
null
null
null
UTF-8
C++
false
false
684
cpp
#include <execinfo.h> #include <signal.h> #include <unistd.h> #include <QApplication> #include <iostream> #include "core/cpu.h" #include "mainwindow.h" #include "spdlog/sinks/basic_file_sink.h" #include "spdlog/spdlog.h" using namespace std; int main(int argc, char* argv[]) { try { auto cpu_logger = spdlog::basic_logger_mt("cpu_logger", "LOG1.txt"); cpu_logger->set_level(spdlog::level::off); } catch (const spdlog::spdlog_ex& ex) { std::cout << "Log init failed: " << ex.what() << std::endl; } QApplication a(argc, argv); MainWindow w; QSize size = w.size(); cout << size.width() << endl; w.show(); return a.exec(); }
[ "tdtrung17693@localhost.localdomain" ]
tdtrung17693@localhost.localdomain
0a271049c197642ea8495d54ae492ceb1325395d
b7f3edb5b7c62174bed808079c3b21fb9ea51d52
/services/network/public/cpp/default_credentials_mojom_traits.h
50f429c3e79d1770f5a19349e7b2b0c9ddd5a4f8
[ "BSD-3-Clause" ]
permissive
otcshare/chromium-src
26a7372773b53b236784c51677c566dc0ad839e4
64bee65c921db7e78e25d08f1e98da2668b57be5
refs/heads/webml
2023-03-21T03:20:15.377034
2020-11-16T01:40:14
2020-11-16T01:40:14
209,262,645
18
21
BSD-3-Clause
2023-03-23T06:20:07
2019-09-18T08:52:07
null
UTF-8
C++
false
false
1,019
h
// Copyright 2019 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef SERVICES_NETWORK_PUBLIC_CPP_DEFAULT_CREDENTIALS_MOJOM_TRAITS_H_ #define SERVICES_NETWORK_PUBLIC_CPP_DEFAULT_CREDENTIALS_MOJOM_TRAITS_H_ #include "ipc/ipc_message_utils.h" #include "mojo/public/cpp/bindings/enum_traits.h" #include "net/http/http_auth_preferences.h" #include "services/network/public/mojom/default_credentials.mojom.h" namespace mojo { template <> struct EnumTraits<network::mojom::DefaultCredentials, net::HttpAuthPreferences::DefaultCredentials> { static network::mojom::DefaultCredentials ToMojom( net::HttpAuthPreferences::DefaultCredentials input); static bool FromMojom(network::mojom::DefaultCredentials input, net::HttpAuthPreferences::DefaultCredentials* output); }; } // namespace mojo #endif // SERVICES_NETWORK_PUBLIC_CPP_DEFAULT_CREDENTIALS_MOJOM_TRAITS_H_
[ "commit-bot@chromium.org" ]
commit-bot@chromium.org
85f8945c72604bba6d8cc851712233c0be388b07
6b2a8dd202fdce77c971c412717e305e1caaac51
/solutions_5686313294495744_0/C++/phsindong/C.cpp
310fee61ede7d6b9ccc27fcc4c21231a9d30df73
[]
no_license
alexandraback/datacollection
0bc67a9ace00abbc843f4912562f3a064992e0e9
076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf
refs/heads/master
2021-01-24T18:27:24.417992
2017-05-23T09:23:38
2017-05-23T09:23:38
84,313,442
2
4
null
null
null
null
UTF-8
C++
false
false
2,172
cpp
#include<iostream> #include<stdio.h> #include<vector> #include<set> #include<cstring> #include<algorithm> #include<string> using namespace std; char input[1000]; vector<string> cString; vector<string> jString; set<string> cAllSet,jAllSet; vector<string> cTry,jTry; string oneString; int minCnt; int N; void solve(int pos, int cnt){ // cout<<pos<<" "<<cnt<<endl; if(pos==N){ set<string> cSet,jSet; for(int i=0;i<cTry.size();i++){ cSet.insert(cTry[i]); } for(int i=0;i<jTry.size();i++){ jSet.insert(jTry[i]); } if(cAllSet.size()==cSet.size() && jAllSet.size()==jSet.size()){ if(minCnt>cnt)minCnt=cnt; } // cout<<cAllSet.size()<<" "<<cSet.size()<<" "<<jAllSet.size()<<" "<<jSet.size()<<endl; // cout<<"minCnt : "<<minCnt<<endl; } else{ solve(pos+1,cnt); cTry.push_back(cString[pos]); jTry.push_back(jString[pos]); solve(pos+1,cnt+1); cTry.pop_back(); jTry.pop_back(); } } int main(){ FILE *inf, *outf; inf=fopen("C-small-attempt0.in","r"); outf=fopen("C-small-attempt0-result.in","w"); int T; fscanf(inf,"%d",&T); for(int i=0;i<T;i++){ fscanf(inf,"%d",&N); cString.clear(); jString.clear(); cAllSet.clear(); jAllSet.clear(); cTry.clear(); jTry.clear(); minCnt = 1000; for(int k=0;k<N;k++){ oneString.clear(); fscanf(inf,"%s",input); for(int j=0;j<strlen(input);j++){ oneString+=input[j]; } cString.push_back(oneString); cAllSet.insert(oneString); oneString.clear(); fscanf(inf,"%s",input); for(int j=0;j<strlen(input);j++){ oneString+=input[j]; } jString.push_back(oneString); jAllSet.insert(oneString); } solve(0,0); fprintf(outf,"Case #%d: %d\n",i+1,N-minCnt); } // getchar(); }
[ "alexandra1.back@gmail.com" ]
alexandra1.back@gmail.com
1f010798e0691784f9fab8d20ea7ae1c7eec53b0
b134183c3b13ac30eba0752f845b2d974dd9c21f
/Engine/Modules/Core/include/LuaCoreModule.h
d24364a25619cfa9a187160a946b5488cbbb68f0
[]
no_license
leafnsand/SamEngine
e7b67a9e49c7feca895f40253588658b59497bb2
2f0a7e80fcd92b0e03c64699db3d6249d359610d
refs/heads/master
2016-09-06T00:20:29.433311
2016-02-14T15:17:46
2016-02-14T15:17:46
40,541,406
0
1
null
null
null
null
UTF-8
C++
false
false
1,539
h
#pragma once #include "CoreModule.h" #include <LuaIntf.h> #include <map> #include <memory> #include <vector> using namespace LuaIntf; namespace LuaIntf { LUA_USING_SHARED_PTR_TYPE(std::shared_ptr) LUA_USING_LIST_TYPE(std::vector) LUA_USING_MAP_TYPE(std::map) } namespace SamEngine { inline static void OpenCoreLuaModule(LuaState state) { LuaBinding(state).beginModule("SamEngine") .beginClass<ILog>("Log") .addStaticFunction("Error", [](std::string message) { GetLog().Error(message.c_str()); }, LUA_ARGS(std::string)) .addStaticFunction("Warning", [](std::string message) { GetLog().Warning(message.c_str()); }, LUA_ARGS(std::string)) .addStaticFunction("Info", [](std::string message) { GetLog().Info(message.c_str()); }, LUA_ARGS(std::string)) .addStaticFunction("Debug", [](std::string message) { GetLog().Debug(message.c_str()); }, LUA_ARGS(std::string)) .endClass() .beginClass<Data>("Data") .addConstructor(LUA_SP(DataPtr), LUA_ARGS(_opt<size_t>)) .addProperty("Size", &Data::GetSize, &Data::SetSize) .addFunction("Clear", &Data::Clear) .addFunction("Empty", &Data::Empty) .endClass() .endModule(); } }
[ "jiangsongyou@gmail.com" ]
jiangsongyou@gmail.com
9fe02442da2eb49c91c4f581d7e4a26e1f46dae6
35014a121319859cbe0ba272724244d0d5938fb6
/STL/1_list.cpp
509db037181adf764642300bc0a3412d233e3714
[]
no_license
MustansirD/CPP
18de48d9ef0d57865aefd2175603a18e55d9c6c5
e6f314fa748bbc8c87c0d2a5c9bfd02a95ea0dda
refs/heads/master
2020-04-14T10:55:49.153676
2019-01-03T04:56:42
2019-01-03T04:56:42
163,799,765
0
0
null
null
null
null
UTF-8
C++
false
false
2,402
cpp
/* List List is a sequence container which takes constant time in inserting and removing elements. List in STL is implemented as Doubly Link List. The elements from List cannot be directly accessed. For example to access element of a particular position ,you have to iterate from a known position to that particular position. */ #include<iostream> #include<list> using namespace std; int main(){ list<int> l; list<int>::iterator l_it; l.push_back(4); //adds a new element at the end of list,after its //current last element l.push_back(5); //l.size() returns the number of elements in a list cout<<"size of list is "<<l.size()<<endl; //l.push_front adds element at the beginning of the list,after its //current first element l.push_front(100); l.push_front(101); cout<<"size after pushing 2 elements in front is "<<l.size()<<endl; //----------------------------------------------------------------------------- l_it = l.begin();//returns reference to the first element in the list cout<<"first element accessed via reference is "<<*l_it<<endl; //---------------------------------------------------------------------------- //l.end() returns an iterator refererring to the theoretical element //which follows the last element l_it = l.end(); cout<<"value of the theoretical element after the last element is "<<*l_it<<endl; cout<<"print all the elements of the list "<<endl; for(l_it=l.begin();l_it!=l.end();l_it++){ cout<<*l_it<<endl; } //-------------------------------------------------------------------------- //remove all the occurence of element from the list l.remove(5); cout<<"printing after removing the occurence of a particular element"<<endl; cout<<"size of lsit after removing occurence of a partuicular element"; cout<<l.size()<<endl; for(l_it = l.begin();l_it!=l.end();l_it++){ cout<<*l_it<<endl; } //------------------------------------------------------------------------- l.pop_back();//removes last element from the list cout<<"print the elements after removing from the list"<<endl; for(l_it=l.begin();l_it!=l.end();l_it++){ cout<<*l_it<<endl; } //-------------------------------------------------------------------------- l.pop_front(); cout<<"print the element after removing the front element from the list"<<endl; for(l_it = l.begin();l_it!=l.end();l_it++){ cout<<*l_it<<endl; } return 0; }
[ "mustansirdaman@gmail.com" ]
mustansirdaman@gmail.com
e6b948e717f4626f85976df7325da843549e45e2
88ae8695987ada722184307301e221e1ba3cc2fa
/chrome/browser/ash/login/extensions/login_screen_extensions_content_script_manager_factory.h
289026490e485090a23b7922c4964fdaed2eba8d
[ "BSD-3-Clause" ]
permissive
iridium-browser/iridium-browser
71d9c5ff76e014e6900b825f67389ab0ccd01329
5ee297f53dc7f8e70183031cff62f37b0f19d25f
refs/heads/master
2023-08-03T16:44:16.844552
2023-07-20T15:17:00
2023-07-23T16:09:30
220,016,632
341
40
BSD-3-Clause
2021-08-13T13:54:45
2019-11-06T14:32:31
null
UTF-8
C++
false
false
1,496
h
// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_ASH_LOGIN_EXTENSIONS_LOGIN_SCREEN_EXTENSIONS_CONTENT_SCRIPT_MANAGER_FACTORY_H_ #define CHROME_BROWSER_ASH_LOGIN_EXTENSIONS_LOGIN_SCREEN_EXTENSIONS_CONTENT_SCRIPT_MANAGER_FACTORY_H_ #include "base/no_destructor.h" #include "chrome/browser/profiles/profile_keyed_service_factory.h" class KeyedService; class Profile; namespace content { class BrowserContext; } namespace ash { class LoginScreenExtensionsContentScriptManager; // Factory for the `LoginScreenExtensionsContentScriptManager` KeyedService. class LoginScreenExtensionsContentScriptManagerFactory : public ProfileKeyedServiceFactory { public: static LoginScreenExtensionsContentScriptManager* GetForProfile( Profile* profile); static LoginScreenExtensionsContentScriptManagerFactory* GetInstance(); private: friend class base::NoDestructor< LoginScreenExtensionsContentScriptManagerFactory>; LoginScreenExtensionsContentScriptManagerFactory(); ~LoginScreenExtensionsContentScriptManagerFactory() override; // BrowserContextKeyedServiceFactory: KeyedService* BuildServiceInstanceFor( content::BrowserContext* context) const override; bool ServiceIsCreatedWithBrowserContext() const override; }; } // namespace ash #endif // CHROME_BROWSER_ASH_LOGIN_EXTENSIONS_LOGIN_SCREEN_EXTENSIONS_CONTENT_SCRIPT_MANAGER_FACTORY_H_
[ "jengelh@inai.de" ]
jengelh@inai.de
6ef3104b65d6ecbcad5781e3fe161c1165e121a7
f25e5bd2c263274b4d7cf735671565807ff9cf0c
/RenderEngine/Include/SkinnedMesh.h
5db986877f2ac12f9411f966351dd31e11eb4b21
[ "MIT" ]
permissive
lele94218/3d-graphics-library
bd12b57cb6cd2b868afb2c6dfacbcc06587379ba
7608deb4c2970fdf7186a19a9e6cc6ad5828df04
refs/heads/master
2021-08-28T20:48:31.750961
2017-12-13T05:37:39
2017-12-13T05:37:39
105,690,286
0
1
null
null
null
null
UTF-8
C++
false
false
3,838
h
/* Copyright 2011 Etay Meiri This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef OGLDEV_SKINNED_MESH_H #define OGLDEV_SKINNED_MESH_H #include <map> #include <vector> #include <GL/glew.h> #include <assimp/Importer.hpp> // C++ importer interface #include <assimp/scene.h> // Output data structure #include <assimp/postprocess.h> // Post processing flags #include <glm/glm.hpp> #include "Utils.h" #include "Texture.h" using namespace std; class SkinnedMesh { public: SkinnedMesh(); ~SkinnedMesh(); bool LoadMesh(const string& Filename); void Render(); uint NumBones() const { return m_NumBones; } void BoneTransform(float TimeInSeconds, vector<glm::mat4>& Transforms); private: #define NUM_BONES_PER_VEREX 4 struct BoneInfo { glm::mat4 BoneOffset; glm::mat4 FinalTransformation; BoneInfo() { BoneOffset = glm::mat4(0.0); FinalTransformation = glm::mat4(0.0); //BoneOffset.SetZero(); //FinalTransformation.SetZero(); } }; struct VertexBoneData { uint IDs[NUM_BONES_PER_VEREX]; float Weights[NUM_BONES_PER_VEREX]; VertexBoneData() { Reset(); }; void Reset() { ZERO_MEM(IDs); ZERO_MEM(Weights); } void AddBoneData(uint BoneID, float Weight); }; void CalcInterpolatedScaling(aiVector3D& Out, float AnimationTime, const aiNodeAnim* pNodeAnim); void CalcInterpolatedRotation(aiQuaternion& Out, float AnimationTime, const aiNodeAnim* pNodeAnim); void CalcInterpolatedPosition(aiVector3D& Out, float AnimationTime, const aiNodeAnim* pNodeAnim); uint FindScaling(float AnimationTime, const aiNodeAnim* pNodeAnim); uint FindRotation(float AnimationTime, const aiNodeAnim* pNodeAnim); uint FindPosition(float AnimationTime, const aiNodeAnim* pNodeAnim); const aiNodeAnim* FindNodeAnim(const aiAnimation* pAnimation, const string NodeName); void ReadNodeHeirarchy(float AnimationTime, const aiNode* pNode, const glm::mat4& ParentTransform); bool InitFromScene(const aiScene* pScene, const string& Filename); void InitMesh(uint MeshIndex, const aiMesh* paiMesh, vector<glm::vec3>& Positions, vector<glm::vec3>& Normals, vector<glm::vec2>& TexCoords, vector<VertexBoneData>& Bones, vector<unsigned int>& Indices); void LoadBones(uint MeshIndex, const aiMesh* paiMesh, vector<VertexBoneData>& Bones); bool InitMaterials(const aiScene* pScene, const string& Filename); void Clear(); void SkinnedMesh::CopyaiMat(const aiMatrix4x4 *from, glm::mat4 &to); void SkinnedMesh::CopyaiMat(const aiMatrix3x3 *from, glm::mat4 &to); #define INVALID_MATERIAL 0xFFFFFFFF enum VB_TYPES { INDEX_BUFFER, POS_VB, NORMAL_VB, TEXCOORD_VB, BONE_VB, NUM_VBs }; GLuint m_VAO; GLuint m_Buffers[NUM_VBs]; struct MeshEntry { MeshEntry() { NumIndices = 0; BaseVertex = 0; BaseIndex = 0; MaterialIndex = INVALID_MATERIAL; } unsigned int NumIndices; unsigned int BaseVertex; unsigned int BaseIndex; unsigned int MaterialIndex; }; vector<MeshEntry> m_Entries; vector<Texture*> m_Textures; map<string, uint> m_BoneMapping; // maps a bone name to its index uint m_NumBones; vector<BoneInfo> m_BoneInfo; glm::mat4 m_GlobalInverseTransform; const aiScene* m_pScene; Assimp::Importer m_Importer; }; #endif /* OGLDEV_SKINNED_MESH_H */
[ "terry.trxue@gmail.com" ]
terry.trxue@gmail.com
fa6d48f0c4bf68ad0f2f0a957879ca0871d03204
baf11cc0aba49c667c68c46a7ece2960bb91b99f
/Room.cpp
10b78a4aa868a6bd9ca0b86fe41c4eeec7dd4012
[]
no_license
KladovValentin/walking_sim
c8acdb20e286d89df36cd723dd3ad823d8615805
f6f2826515d24a986e3a1c1dcebcd8db54c919e0
refs/heads/main
2023-07-08T23:23:05.138727
2021-08-12T15:11:31
2021-08-12T15:11:31
392,653,423
0
0
null
null
null
null
UTF-8
C++
false
false
968
cpp
#include "Room.h" Room::Room(vector<point> inputcorners) { convex.setPointCount(inputcorners.size()); for (size_t i = 0; i < inputcorners.size(); i++) { corners.push_back(inputcorners[i]); convex.setPoint(i, sf::Vector2f(inputcorners[i].x, inputcorners[i].y)); } for (size_t i = 0; i < inputcorners.size(); i++) { neighbours.push_back(NULL); walls.push_back(NULL); } corners.push_back(inputcorners[0]); n = n0; n0++; } int Room::n0 = 0; void Room::linkWall(int borderIndex, Wall* wall) { walls[borderIndex] = wall; } void Room::linkWall0(Wall* wall) { walls.push_back(wall); } void Room::addjust(Room* room2) { for (size_t i = 0; i < corners.size() - 1; i++) { for (size_t j = 1; j < room2->corners.size(); j++) { if (corners[i] == room2->corners[j] && corners[i + 1] == room2->corners[j - 1]) { neighbours[i] = room2; } } } }
[ "Valentin1208@gmail.com" ]
Valentin1208@gmail.com
2d0fa3124dda5b7e860d9eb6fe41289356549710
4de159aea4b1eb5a527a3011275be57c4bb8d28f
/src/deps/newton/dWrappers/csharp/wrapperSdk/dNewtonVehicle.h
a4ce964940421138628936ac355b87cc88979dc4
[ "MIT", "LicenseRef-scancode-free-unknown" ]
permissive
tanis2000/binocle-c
27691ec089a4b75acc451ef6abc4767cb06a6fdd
cd3dbacdd5cb94bfce489b9ee2f07e218c645e29
refs/heads/master
2023-09-04T20:39:34.331172
2023-08-29T13:22:12
2023-08-29T13:22:12
192,515,187
132
8
MIT
2023-05-09T14:39:31
2019-06-18T10:07:33
C
UTF-8
C++
false
false
1,619
h
/* * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * * 3. This notice may not be removed or altered from any source distribution. */ #ifndef _D_NEWTON_VEHICLE_H_ #define _D_NEWTON_VEHICLE_H_ #include "stdafx.h" #include "dAlloc.h" #include "dNewtonBody.h" class dNewtonVehicle; class dTireData { public: dMatrix matrix; dFloat mass; void* m_owner; }; class dNewtonWheel: public dAlloc { public: dNewtonWheel(dNewtonVehicle* const owner, dTireData tire); ~dNewtonWheel(); void* GetUserData(); private: // dCustomVehicleController::dBodyPartTire* m_wheel; void* m_owner; }; class dNewtonVehicle: public dNewtonDynamicBody { public: dNewtonVehicle(dNewtonWorld* const world, dNewtonCollision* const collision, dMatrix matrix, dFloat mass); ~dNewtonVehicle(); // dCustomVehicleController::dBodyPartTire* AddTire(dTireData tire); dCustomVehicleController* m_controller; }; #endif
[ "santinelli@altralogica.it" ]
santinelli@altralogica.it
57c8e5d17b817d65031bb823354e34c28d1735f3
aed2ad37d2896a0a8cbc008fc225d23b2383d481
/Vesselness/GLDirection.h
3dc06d296e9951dc01a9962124380a73cc02f57a
[]
no_license
qchen2017/Thin_Vessel_Segmentation
67b8b67f13010f8b2b3a10b4eee4e8e69b1d7fb7
e1e4c1d20acd6fddf2b5ef55abdc6c4a8d5ea71d
refs/heads/master
2021-08-19T09:31:35.847731
2017-11-25T15:52:19
2017-11-25T15:52:19
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,653
h
#pragma once #include <queue> #include "GLViewer.h" #include "VesselnessTypes.h" #include "Data3D.h" namespace GLViewer { // rendering object with Maximum Intenstiy Projection class Direction : public GLViewer::Object { ///////////////////////////////////////// // Data /////////////////////// Data3D<Vesselness_Sig> *ptrVnSig; public: Direction( Data3D<Vesselness_Sig>& vn_sig ) : ptrVnSig( &vn_sig ) { } ~Direction() { ptrVnSig = NULL; } void init() { glDisable (GL_LINE_SMOOTH); // glHint (GL_LINE_SMOOTH_HINT, GL_NICEST ); } void render(void) { glBegin( GL_LINES ); int gap = 1; for( int z=0; z<ptrVnSig->SZ(); z+=gap ) { for( int y=0; y<ptrVnSig->SY(); y+=gap ) { for( int x=0; x<ptrVnSig->SX(); x+=gap ) { if( ptrVnSig->at(x, y, z).rsp > 0.1f ) { // select line color glColor4f( 1.0, 0.0, 0.0, ptrVnSig->at(x,y,z).rsp); // draw line cv::Vec3f d = ptrVnSig->at(x,y,z).dir; glVertex3f( x + d[0], y + d[1], z + d[2] ); glVertex3f( x - d[0], y - d[1], z - d[2] ); } } } } glEnd(); } unsigned int size_x() const { return ptrVnSig->SX(); } unsigned int size_y() const { return ptrVnSig->SY(); } unsigned int size_z() const { return ptrVnSig->SZ(); } }; }
[ "yzhong.cs@gmail.com" ]
yzhong.cs@gmail.com
90299b210723b0d293ac5659c41e19fab783377b
405d641c6487d96be9e68843edae2e3d3198f975
/Projekat/mod1/ProcessWavFile/ProcessWavFile/main.cpp
b9c4d47b3ceeea2a2bba70eec3d3d9ee3fdd2e40
[]
no_license
Djape96/aadsp2
8d7a46bdfb38f7de9acf2b637479234800b4828c
9ca0f6ecebcfbca7cef26971d1e81c986a9310c0
refs/heads/master
2020-04-10T01:10:53.904301
2018-12-06T17:25:35
2018-12-06T17:25:35
160,708,252
0
0
null
null
null
null
UTF-8
C++
false
false
5,120
cpp
#include <stdlib.h> #include <string.h> #include "WAVheader.h" #include "expander.h" #include <cmath> #include "common.h" double sampleBuffer[MAX_NUM_CHANNEL][BLOCK_SIZE]; AudioExpander_t expander; double input_gain; int mode; int i; const double tap_gain_minus6db = 0.25; const double tap_gain_5db = 0.79; const double tap_gain_minus16db = 0.025; const double tap_gain_3db = 0.995; const double tap_gain_minus1db = -1.00; void processing() { double* pChannel0 = sampleBuffer[0]; double* pChannel1 = sampleBuffer[1]; double* pChannel2 = sampleBuffer[2]; double* pChannel3 = sampleBuffer[3]; double* pChannel4 = sampleBuffer[4]; double* tmp_channel0 = pChannel0; double* tmp_channel1 = pChannel1; for (i = 0; i < BLOCK_SIZE; i++) { *tmp_channel0++ = *tmp_channel0 * input_gain; *tmp_channel1++ = *tmp_channel1 * input_gain; } tmp_channel0 -= BLOCK_SIZE; tmp_channel1 -= BLOCK_SIZE; for (i = 0; i < BLOCK_SIZE; i++) { *pChannel3++ = *tmp_channel1++ * tap_gain_minus1db; } tmp_channel1 -= BLOCK_SIZE; if (mode == 1) { for (i = 0; i < BLOCK_SIZE; i++) { *pChannel0 = *tmp_channel0 * tap_gain_minus6db; *pChannel2 = *tmp_channel0 * tap_gain_3db; *pChannel2 = *(pChannel2) * 2; pChannel0++; pChannel2++; tmp_channel0++; } } else { for (i = 0; i < BLOCK_SIZE; i++) { *pChannel0++ = *tmp_channel0 * tap_gain_minus16db; *pChannel2 = *tmp_channel0 * tap_gain_5db; *pChannel2 = *(pChannel2) * 4; pChannel2++; tmp_channel0++; } } tmp_channel0 -= BLOCK_SIZE; gst_audio_dynamic_transform_expander_double(&expander, tmp_channel0); gst_audio_dynamic_transform_expander_double(&expander, tmp_channel1); for (i = 0; i < BLOCK_SIZE; i++) { *pChannel1++ = *tmp_channel0++; *pChannel4++ = *tmp_channel1++; } } int main(int argc, char* argv[]) { FILE *wav_in = NULL; FILE *wav_out = NULL; char WavInputName[256]; char WavOutputName[256]; WAV_HEADER inputWAVhdr, outputWAVhdr; int enable_processing = 1; output_mode mode_o = mode1; if (argc == 7) { enable_processing = atoi(argv[3]); input_gain = atoi(argv[4]); mode = atoi(argv[5]); mode_o = (output_mode)atoi(argv[6]); input_gain = pow(10, input_gain / 10); } // Init channel buffers for (int i = 0; i < MAX_NUM_CHANNEL; i++) memset(&sampleBuffer[i], 0, BLOCK_SIZE); // Open input and output wav files //------------------------------------------------- strcpy(WavInputName, argv[1]); wav_in = OpenWavFileForRead(WavInputName, "rb"); strcpy(WavOutputName, argv[2]); wav_out = OpenWavFileForRead(WavOutputName, "wb"); //------------------------------------------------- // Read input wav header //------------------------------------------------- ReadWavHeader(wav_in, inputWAVhdr); //------------------------------------------------- // Set up output WAV header //------------------------------------------------- outputWAVhdr = inputWAVhdr; outputWAVhdr.fmt.NumChannels = NUM_OF_CHANNELS; // change number of channels int oneChannelSubChunk2Size = inputWAVhdr.data.SubChunk2Size / inputWAVhdr.fmt.NumChannels; int oneChannelByteRate = inputWAVhdr.fmt.ByteRate / inputWAVhdr.fmt.NumChannels; int oneChannelBlockAlign = inputWAVhdr.fmt.BlockAlign / inputWAVhdr.fmt.NumChannels; outputWAVhdr.data.SubChunk2Size = oneChannelSubChunk2Size*outputWAVhdr.fmt.NumChannels; outputWAVhdr.fmt.ByteRate = oneChannelByteRate*outputWAVhdr.fmt.NumChannels; outputWAVhdr.fmt.BlockAlign = oneChannelBlockAlign*outputWAVhdr.fmt.NumChannels; // Write output WAV header to file //------------------------------------------------- WriteWavHeader(wav_out, outputWAVhdr); //Init audio expander audio_expander_init(&expander); // Processing loop //------------------------------------------------- { int sample; int BytesPerSample = inputWAVhdr.fmt.BitsPerSample / 8; const double SAMPLE_SCALE = -(double)(1 << 31); //2^31 int iNumSamples = inputWAVhdr.data.SubChunk2Size / (inputWAVhdr.fmt.NumChannels*inputWAVhdr.fmt.BitsPerSample / 8); // exact file length should be handled correctly... for (int i = 0; i<iNumSamples / BLOCK_SIZE; i++) { for (int j = 0; j<BLOCK_SIZE; j++) { for (int k = 0; k<inputWAVhdr.fmt.NumChannels; k++) { sample = 0; //debug fread(&sample, BytesPerSample, 1, wav_in); sample = sample << (32 - inputWAVhdr.fmt.BitsPerSample); // force signextend sampleBuffer[k][j] = sample / SAMPLE_SCALE; // scale sample to 1.0/-1.0 range } } if (enable_processing) processing(); for (int j = 0; j<BLOCK_SIZE; j++) { for (int k = 0; k<outputWAVhdr.fmt.NumChannels; k++) { sample = sampleBuffer[k][j] * SAMPLE_SCALE; // crude, non-rounding sample = sample >> (32 - inputWAVhdr.fmt.BitsPerSample); if ((mode_o == mode1) && (k != 0 && k != 3 )) { sample = 0; } fwrite(&sample, outputWAVhdr.fmt.BitsPerSample / 8, 1, wav_out); } } } } // Close files //------------------------------------------------- fclose(wav_in); fclose(wav_out); //------------------------------------------------- return 0; }
[ "predragradonjic96@gmail.com" ]
predragradonjic96@gmail.com
3c4c3f76e573a2dbe9e1845c8c24e9d3fc75fd77
65e00876bdb944938fc9f80f74c98372268d4d3d
/Graphs/connected_components2.cpp
ebebe07d9a9cd2ca1a54218d3ee0c0a3d60eed9f
[]
no_license
nipunarora-eGov/Coding-Interview-101
372086b1e80f03e3f00a7b5b8616e0966c0a29f6
9fda66bfe0afedc2d161b1657e75a286a0ccdb9e
refs/heads/main
2023-02-15T07:59:33.433792
2021-01-06T09:57:42
2021-01-06T09:57:42
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,568
cpp
#include <iostream> #include <vector> #include <unordered_set> using namespace std; void dfs(int start, vector<int>* edges, int n, unordered_set<int>& visited, unordered_set<int>* component) { visited.insert(start); component->insert(start); vector<int>::iterator it = edges[start].begin(); for (;it != edges[start].end(); it++) { int i = *it; if (visited.count(i) > 0) { continue; } dfs(i, edges,n, visited, component); } } unordered_set<unordered_set<int>*>* getComponents(vector<int>* edges, int n) { unordered_set<int> visited; unordered_set<unordered_set<int>*>* output = new unordered_set<unordered_set<int>*>(); for (int i = 0; i < n; i++) { if (visited.count(i) == 0) { unordered_set<int>* component = new unordered_set<int>(); dfs(i, edges,n, visited, component); output->insert(component); } } return output; } int main() { int n; cin >> n; vector<int>* edges = new vector<int>[n]; int m; cin >> m; for (int i = 0; i < m; i++) { int j, k; cin >> j >> k; edges[j - 1].push_back(k - 1); edges[k - 1].push_back(j - 1); } unordered_set<unordered_set<int>*>* components = getComponents(edges, n); cout<<components->size()<<"nipun"<<endl; unordered_set<unordered_set<int>*>::iterator it = components->begin(); while (it != components->end()) { unordered_set<int>* component = *it; unordered_set<int>::iterator it2 = component->begin(); while (it2 != component->end()) { cout << *it2 + 1 << " "; it2++; } cout << endl; delete component; it++; } delete components; delete edges; }
[ "aroranipun1@gmail.com" ]
aroranipun1@gmail.com
e7e7fef4f187449086e746ed13ff970cb511a32a
2d07dd66925e083634ad9a45a4eab026252a2b34
/Competitive Programming 3/String Processing/Ad Hoc String Processing Problems - Part 2/11056 Formula 1.cpp
091af6f86b2657ab66173e611e87d27bd2ae1e22
[]
no_license
wilmercastrillon/Ejercicios-Uva-Judge-Online
8d4f4ccf541be69d2a812d3bf784f6f71e1829a1
4ef8d6e15a0afaa2aed031ffc05e6b1ef3b98324
refs/heads/master
2021-01-18T03:24:17.282090
2021-01-08T01:46:36
2021-01-08T01:46:36
84,270,599
0
0
null
null
null
null
UTF-8
C++
false
false
1,292
cpp
#include <bits/stdc++.h> #define forr(i,n) for(int i = 0; i < n; ++i) #define forab(i,a,b) for(int i = a; i < b; ++i) using namespace std; typedef pair<int, string> is; vector<is> cars; void tolower(string &s){ forr(i, s.size()){ if(isalpha(s[i])) s[i] = tolower(s[i]); } } bool cmp(is &a, is &b){ if(a.first != b.first) return a.first < b.first; string s1 = a.second, s2 = b.second; tolower(s1); tolower(s2); return s1 < s2; } int main(){ //freopen("salida.txt", "w", stdout); int n, t, aux; string nombre, x, in; while(cin >> n){ cars.clear(); getchar(); forr(i, n){ getline(cin, in); istringstream ss(in); ss >> nombre; ss >> x;//: ss >> aux; t = aux * 60; ss >> x;//min ss >> aux; t += aux; ss >> x;//sec ss >> aux; t = (t*1000) + aux; cars.push_back(is(t, nombre)); } sort(cars.begin(), cars.end(), cmp); forr(i, n){ if(i % 2 == 0){ cout << "Row " << (i/2+1) << endl; } cout << cars[i].second << '\n'; } cout << '\n'; } return 0; }
[ "wilmercastrillon98@gmail.com" ]
wilmercastrillon98@gmail.com
a1dd651ea65df0b62a8b64b0c4faf5ac587605af
d5304bab6cf8883f95fb1b1f98edb777e036e438
/main.cpp
d5b11528256bd4ed8aeaa9d7beaeb58b248b9dbf
[]
no_license
acrowfliedover/Questris
9c9815463a7e052a32092ce70e57a48f025ba077
0183d5d4d8dddfc4c0cd492f28c42de9cec26eaf
refs/heads/master
2021-08-30T08:01:07.219867
2017-12-16T22:59:14
2017-12-16T22:59:14
108,478,256
0
0
null
null
null
null
UTF-8
C++
false
false
392
cpp
//I don't have as much time as I expected on this project... //So I would just create some functions that would be used in the project... //which I may complete during winter break. #include "blocks.h" #include <QApplication> int main(int argc, char *argv[]) { Grid G; Mino_I I; G.move_left(I); QApplication a(argc, argv); blocks w; w.show(); return a.exec(); }
[ "leofanrong@gmail.com" ]
leofanrong@gmail.com
df3a0c239c66fed37772507a3b56ddbb1756a578
e51251c1c24c6876d0a238cab31af1fe709e6334
/UVA/x11076 - Add Again/Template.cpp
d42ef2e45fa94e9d38408a998b4d943d8ae2f2e8
[]
no_license
amubawrnaw/CPL_Solutions
0329bd52395fc8be61a924f99e3f6b42fefab9ab
5c18894a9ee18278c915a239a36842747af0feef
refs/heads/master
2021-05-25T11:46:12.527596
2020-08-15T15:53:48
2020-08-15T15:53:48
127,302,602
0
0
null
null
null
null
UTF-8
C++
false
false
697
cpp
#include <bits/stdc++.h> using namespace std; typedef pair<int,int> ii; typedef vector<int> vi; typedef vector<ii> vii; typedef long long ll; typedef pair<int,ii> iii; int main() { freopen("out.txt","wt",stdout); string line; int n; while(scanf("%d",&n),n) { set<int> s; ll mult = 1; int arr[n]; int temp; ll sum = 0; for(int i = 0 , k = n-1; i < n ; i++, k--){ scanf("%d", &temp); s.insert(temp); } vector<int> v(s.begin(), s.end()); for(int i = 0 ; i < s.size() ; i++){ sum+= v[i]; if(i>1) mult*=i; } ll ans = 0; sum*=mult; mult = 1; for(int i = 0 ; i < n ; i++){ ans+=sum*mult; mult*=10; } printf("%lld\n", ans); } return 0; }
[ "amubawrnaw@gmail.com" ]
amubawrnaw@gmail.com
69ddebbc00babf0b690ee466e9cf7b4fc0ec14c2
6b4523f8c47646035f27746d6de20fecf9bf647d
/STLlist/STLlist.cpp
4976e5ea6d46d2d60ffc621529985c1a57812605
[]
no_license
krknight/Sauce
4707433e201ec7ddaf2e7f6f2705be0dbc15365d
42a97e490cd23b0c5ca5e914e5f5bbab19022b5c
refs/heads/master
2020-05-17T04:54:33.497018
2019-07-05T19:49:52
2019-07-05T19:49:52
183,520,676
0
0
null
null
null
null
UTF-8
C++
false
false
1,223
cpp
//============================================================================ // Name : STLlist.cpp // Author : // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================ #include <iostream> #include <list> using namespace std; void showlist (list <int> g) { list <int> :: iterator it; // this is how to declare an iterator, vector<int>::iterator ptr; for(it = g.begin(); it != g.end(); ++it) { cout << '\t' << *it; } cout << '\n'; } int main() { list <int> gqlist1, gqlist2; for (int i = 0; i < 10; i++) { gqlist1.push_back(i*2); gqlist2.push_front(i*3); } cout << "gqlist1 is "; showlist(gqlist1); cout << "gqlist2 is "; showlist(gqlist2); cout << "\ngqlist1.front() : " << gqlist1.front(); cout << "\nqqlist1.back() : " << gqlist1.back(); cout << "\ngqlist1.pop_front() : "; gqlist1.pop_front(); showlist(gqlist1); cout << "\ngqlist1.pop_back() : "; gqlist1.pop_back(); showlist(gqlist1); cout << "\ngqlist1.reverse() : "; gqlist1.reverse(); showlist(gqlist1); cout << "\ngqlist2.sort(): "; gqlist2.sort(); showlist(gqlist2); return 0; }
[ "keith.knight@rockwellcollins.com" ]
keith.knight@rockwellcollins.com
09e9507a6120fd9eed55754809a310f939c84253
3c6a03f64e42e9fc43400958d8e2962a47a8ef5c
/source/engine/resources/MusicResource.h
79bda2c5ce616a9d1d211cc926ab7495e7ece1e5
[ "MIT" ]
permissive
AlexKoukoulas2074245K/Genesis
b9aa976f6fdcdf12e4f4d56d14fa324933e8996f
23c114cfe06b65b0b7b5f7807a9ceb4faf8cdf88
refs/heads/master
2021-06-29T22:26:34.885146
2021-02-28T15:21:09
2021-02-28T15:21:09
222,722,925
0
0
null
null
null
null
UTF-8
C++
false
false
1,310
h
///------------------------------------------------------------------------------------------------ /// MusicResource.h /// Genesis /// /// Created by Alex Koukoulas on 20/11/2019. ///------------------------------------------------------------------------------------------------ #ifndef MusicResource_h #define MusicResource_h ///------------------------------------------------------------------------------------------------ #include "IResource.h" #include <SDL_mixer.h> ///------------------------------------------------------------------------------------------------ namespace genesis { ///------------------------------------------------------------------------------------------------ namespace resources { ///------------------------------------------------------------------------------------------------ class MusicResource final : public IResource { friend class MusicLoader; public: ~MusicResource(); Mix_Music* GetSdlMusicHandle() const; private: MusicResource(Mix_Music* const); Mix_Music* const mSdlMusicHandle; }; ///------------------------------------------------------------------------------------------------ } } ///------------------------------------------------------------------------------------------------ #endif /* TextureResource_h */
[ "alex.koukoulas@king.com" ]
alex.koukoulas@king.com
d918a1fe099574774adc15cecfce71f6dd0b3cf4
bc210ab658c83e3a1019317024cc05a0f124b8f4
/Rainforce/goal.cpp
12d5731bf6f738cbdd5d71558bae81893373322b
[]
no_license
Tomself/rainforce
01e0eb6b31e790f24c5896a6d38115d568c50211
b634ac20fe9b9e254c0cfdac7f9421d9593b6e6f
refs/heads/master
2021-01-10T15:19:18.934278
2015-12-09T04:38:24
2015-12-09T04:38:24
47,665,442
0
0
null
null
null
null
UTF-8
C++
false
false
529
cpp
#include "stdafx.h" #include "goal.h" #include "rrandom.h" goal::goal() { _mx = 0; _my = 0; _fieldNum = 0; _fx = 0; _fy = 0; } goal::goal(int fn) { _fieldNum = fn; } goal::~goal() { } int goal::random() { int n; n = rrandom(_fieldNum); return n; } void goal::setMyRocation() { _mx = random(); _my = random(); } void goal::resetMyRocation() { _mx = _fx; _my = _fy; } void goal::setFirstRocation() { _fx = _mx; _fy = _my; } void goal::getMyRocation(int* ret) { ret[0] = _mx; ret[1] = _my; }
[ "researchtoom@outlook.com" ]
researchtoom@outlook.com
3801c4728eb4237533091ce99fb3924fed35fb5b
45014139581f1211a43b6415a6ee32d442c29fc0
/src/services/network/network_context.h
706a87b596b98b94b5c96b5c904ca430684347a2
[ "BSD-3-Clause" ]
permissive
webosose/chromium91
a31b847e64391c3de98ca5b6dac3ac247d393e78
b28e2ae83ee2e4907a36a49a4c0f054aa386dbfa
refs/heads/master
2022-12-12T09:32:30.580155
2022-09-01T09:02:15
2022-09-18T23:58:11
460,692,960
1
5
null
2022-10-05T07:19:39
2022-02-18T03:16:04
null
UTF-8
C++
false
false
33,175
h
// Copyright 2017 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef SERVICES_NETWORK_NETWORK_CONTEXT_H_ #define SERVICES_NETWORK_NETWORK_CONTEXT_H_ #include <stdint.h> #include <map> #include <memory> #include <set> #include <string> #include <utility> #include <vector> #include "base/callback.h" #include "base/component_export.h" #include "base/containers/flat_map.h" #include "base/containers/flat_set.h" #include "base/containers/unique_ptr_adapters.h" #include "base/macros.h" #include "base/optional.h" #include "base/time/time.h" #include "build/build_config.h" #include "build/chromeos_buildflags.h" #include "components/cookie_config/cookie_store_util_neva.h" #include "mojo/public/cpp/base/big_buffer.h" #include "mojo/public/cpp/bindings/pending_receiver.h" #include "mojo/public/cpp/bindings/pending_remote.h" #include "mojo/public/cpp/bindings/receiver.h" #include "mojo/public/cpp/bindings/remote.h" #include "mojo/public/cpp/bindings/unique_receiver_set.h" #include "net/base/network_isolation_key.h" #include "net/cert/cert_verifier.h" #include "net/cert/cert_verify_result.h" #include "net/dns/host_resolver.h" #include "net/dns/public/dns_config_overrides.h" #include "net/http/http_auth_preferences.h" #include "neva/pal_service/public/mojom/os_crypt.mojom.h" #include "services/network/cors/preflight_controller.h" #include "services/network/http_cache_data_counter.h" #include "services/network/http_cache_data_remover.h" #include "services/network/network_qualities_pref_delegate.h" #include "services/network/origin_policy/origin_policy_manager.h" #include "services/network/public/cpp/cors/origin_access_list.h" #include "services/network/public/cpp/network_service_buildflags.h" #include "services/network/public/mojom/cookie_access_observer.mojom.h" #include "services/network/public/mojom/cookie_manager.mojom-shared.h" #include "services/network/public/mojom/host_resolver.mojom.h" #include "services/network/public/mojom/network_context.mojom-forward.h" #include "services/network/public/mojom/network_context.mojom.h" #include "services/network/public/mojom/origin_policy_manager.mojom.h" #include "services/network/public/mojom/proxy_lookup_client.mojom.h" #include "services/network/public/mojom/proxy_resolving_socket.mojom.h" #include "services/network/public/mojom/restricted_cookie_manager.mojom.h" #include "services/network/public/mojom/tcp_socket.mojom.h" #include "services/network/public/mojom/udp_socket.mojom.h" #include "services/network/public/mojom/url_loader_factory.mojom.h" #include "services/network/public/mojom/websocket.mojom.h" #include "services/network/socket_factory.h" #include "services/network/url_request_context_owner.h" #include "services/network/web_bundle_manager.h" #if BUILDFLAG(IS_CHROMEOS_ASH) #include "crypto/scoped_nss_types.h" #endif namespace base { class UnguessableToken; } // namespace base namespace net { class CertNetFetcher; class CertNetFetcherURLRequest; class CertVerifier; class HostPortPair; class IsolationInfo; class NetworkIsolationKey; class ReportSender; class StaticHttpUserAgentSettings; class URLRequestContext; } // namespace net namespace certificate_transparency { class ChromeRequireCTDelegate; } // namespace certificate_transparency namespace domain_reliability { class DomainReliabilityMonitor; } // namespace domain_reliability namespace network { class CertVerifierWithTrustAnchors; class CookieManager; class ExpectCTReporter; class HostResolver; class MdnsResponderManager; class NetworkService; class NetworkServiceNetworkDelegate; class NetworkServiceProxyDelegate; class P2PSocketManager; class PendingTrustTokenStore; class ProxyLookupRequest; class QuicTransport; class ResourceScheduler; class ResourceSchedulerClient; class SessionCleanupCookieStore; class SQLiteTrustTokenPersister; class WebSocketFactory; namespace cors { class CorsURLLoaderFactory; } // namespace cors // A NetworkContext creates and manages access to a URLRequestContext. // // When the network service is enabled, NetworkContexts are created through // NetworkService's mojo interface and are owned jointly by the NetworkService // and the mojo::Remote<NetworkContext> used to talk to them, and the // NetworkContext is destroyed when either one is torn down. class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext : public mojom::NetworkContext { public: using OnConnectionCloseCallback = base::OnceCallback<void(NetworkContext* network_context)>; NetworkContext(NetworkService* network_service, mojo::PendingReceiver<mojom::NetworkContext> receiver, mojom::NetworkContextParamsPtr params, OnConnectionCloseCallback on_connection_close_callback = OnConnectionCloseCallback()); // DEPRECATED: Creates a NetworkContext that simply wraps a consumer-provided // URLRequestContext that is not owned by the NetworkContext. // TODO(mmenke): Remove this constructor when the network service ships. NetworkContext(NetworkService* network_service, mojo::PendingReceiver<mojom::NetworkContext> receiver, net::URLRequestContext* url_request_context, const std::vector<std::string>& cors_exempt_header_list); ~NetworkContext() override; // Sets a global CertVerifier to use when initializing all profiles. static void SetCertVerifierForTesting(net::CertVerifier* cert_verifier); net::URLRequestContext* url_request_context() { return url_request_context_; } NetworkService* network_service() { return network_service_; } mojom::NetworkContextClient* client() { return client_.is_bound() ? client_.get() : nullptr; } ResourceScheduler* resource_scheduler() { return resource_scheduler_.get(); } CookieManager* cookie_manager() { return cookie_manager_.get(); } const base::flat_set<std::string>* cors_exempt_header_list() const { return &cors_exempt_header_list_; } bool allow_any_cors_exempt_header_for_browser() const { return params_ && params_->allow_any_cors_exempt_header_for_browser; } #if defined(OS_ANDROID) base::android::ApplicationStatusListener* app_status_listener() const { return app_status_listener_.get(); } #endif // Creates a URLLoaderFactory with a ResourceSchedulerClient specified. This // is used to reuse the existing ResourceSchedulerClient for cloned // URLLoaderFactory. void CreateURLLoaderFactory( mojo::PendingReceiver<mojom::URLLoaderFactory> receiver, mojom::URLLoaderFactoryParamsPtr params, scoped_refptr<ResourceSchedulerClient> resource_scheduler_client); // Creates a URLLoaderFactory with params specific to the // CertVerifierService. A URLLoaderFactory created by this function will be // used by a CertNetFetcherURLLoader to perform AIA and OCSP fetching. // These URLLoaderFactories should only ever be used by the // CertVerifierService, and should never be passed to a renderer. void CreateURLLoaderFactoryForCertNetFetcher( mojo::PendingReceiver<mojom::URLLoaderFactory> factory_receiver); // Enables DoH probes to be sent using this context whenever the DNS // configuration contains DoH servers. void ActivateDohProbes(); // mojom::NetworkContext implementation: void SetClient( mojo::PendingRemote<mojom::NetworkContextClient> client) override; void CreateURLLoaderFactory( mojo::PendingReceiver<mojom::URLLoaderFactory> receiver, mojom::URLLoaderFactoryParamsPtr params) override; void ResetURLLoaderFactories() override; void GetCookieManager( mojo::PendingReceiver<mojom::CookieManager> receiver) override; void GetRestrictedCookieManager( mojo::PendingReceiver<mojom::RestrictedCookieManager> receiver, mojom::RestrictedCookieManagerRole role, const url::Origin& origin, const net::IsolationInfo& isolation_info, mojo::PendingRemote<mojom::CookieAccessObserver> observer) override; void GetHasTrustTokensAnswerer( mojo::PendingReceiver<mojom::HasTrustTokensAnswerer> receiver, const url::Origin& top_frame_origin) override; void ClearTrustTokenData(mojom::ClearDataFilterPtr filter, base::OnceClosure done) override; void GetStoredTrustTokenCounts( GetStoredTrustTokenCountsCallback callback) override; void DeleteStoredTrustTokens( const url::Origin& issuer, DeleteStoredTrustTokensCallback callback) override; void ClearNetworkingHistoryBetween( base::Time start_time, base::Time end_time, base::OnceClosure completion_callback) override; void ClearHttpCache(base::Time start_time, base::Time end_time, mojom::ClearDataFilterPtr filter, ClearHttpCacheCallback callback) override; void ComputeHttpCacheSize(base::Time start_time, base::Time end_time, ComputeHttpCacheSizeCallback callback) override; void NotifyExternalCacheHit(const GURL& url, const std::string& http_method, const net::NetworkIsolationKey& key, bool is_subframe_document_resource) override; void ClearHostCache(mojom::ClearDataFilterPtr filter, ClearHostCacheCallback callback) override; void ClearHttpAuthCache(base::Time start_time, base::Time end_time, ClearHttpAuthCacheCallback callback) override; void ClearReportingCacheReports( mojom::ClearDataFilterPtr filter, ClearReportingCacheReportsCallback callback) override; void ClearReportingCacheClients( mojom::ClearDataFilterPtr filter, ClearReportingCacheClientsCallback callback) override; void ClearNetworkErrorLogging( mojom::ClearDataFilterPtr filter, ClearNetworkErrorLoggingCallback callback) override; void ClearDomainReliability(mojom::ClearDataFilterPtr filter, DomainReliabilityClearMode mode, ClearDomainReliabilityCallback callback) override; void GetDomainReliabilityJSON( GetDomainReliabilityJSONCallback callback) override; void CloseAllConnections(CloseAllConnectionsCallback callback) override; void CloseIdleConnections(CloseIdleConnectionsCallback callback) override; void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id, mojom::NetworkConditionsPtr conditions) override; void SetAcceptLanguage(const std::string& new_accept_language) override; void SetEnableReferrers(bool enable_referrers) override; #if BUILDFLAG(IS_CHROMEOS_ASH) void UpdateAdditionalCertificates( mojom::AdditionalCertificatesPtr additional_certificates) override; #endif #if BUILDFLAG(IS_CT_SUPPORTED) void SetCTPolicy(mojom::CTPolicyPtr ct_policy) override; void AddExpectCT(const std::string& domain, base::Time expiry, bool enforce, const GURL& report_uri, const net::NetworkIsolationKey& network_isolation_key, AddExpectCTCallback callback) override; void SetExpectCTTestReport(const GURL& report_uri, SetExpectCTTestReportCallback callback) override; void GetExpectCTState(const std::string& domain, const net::NetworkIsolationKey& network_isolation_key, GetExpectCTStateCallback callback) override; void MaybeEnqueueSCTReport( const net::HostPortPair& host_port_pair, const net::X509Certificate* validated_certificate_chain, const net::SignedCertificateTimestampAndStatusList& signed_certificate_timestamps); void SetSCTAuditingEnabled(bool enabled) override; bool is_sct_auditing_enabled() { return is_sct_auditing_enabled_; } #endif // BUILDFLAG(IS_CT_SUPPORTED) void CreateUDPSocket( mojo::PendingReceiver<mojom::UDPSocket> receiver, mojo::PendingRemote<mojom::UDPSocketListener> listener) override; void CreateTCPServerSocket( const net::IPEndPoint& local_addr, uint32_t backlog, const net::MutableNetworkTrafficAnnotationTag& traffic_annotation, mojo::PendingReceiver<mojom::TCPServerSocket> receiver, CreateTCPServerSocketCallback callback) override; void CreateTCPConnectedSocket( const base::Optional<net::IPEndPoint>& local_addr, const net::AddressList& remote_addr_list, mojom::TCPConnectedSocketOptionsPtr tcp_connected_socket_options, const net::MutableNetworkTrafficAnnotationTag& traffic_annotation, mojo::PendingReceiver<mojom::TCPConnectedSocket> receiver, mojo::PendingRemote<mojom::SocketObserver> observer, CreateTCPConnectedSocketCallback callback) override; void CreateTCPBoundSocket( const net::IPEndPoint& local_addr, const net::MutableNetworkTrafficAnnotationTag& traffic_annotation, mojo::PendingReceiver<mojom::TCPBoundSocket> receiver, CreateTCPBoundSocketCallback callback) override; void CreateProxyResolvingSocketFactory( mojo::PendingReceiver<mojom::ProxyResolvingSocketFactory> receiver) override; void LookUpProxyForURL(const GURL& url, const net::NetworkIsolationKey& network_isolation_key, mojo::PendingRemote<mojom::ProxyLookupClient> proxy_lookup_client) override; void ForceReloadProxyConfig(ForceReloadProxyConfigCallback callback) override; void ClearBadProxiesCache(ClearBadProxiesCacheCallback callback) override; void CreateWebSocket( const GURL& url, const std::vector<std::string>& requested_protocols, const net::SiteForCookies& site_for_cookies, const net::IsolationInfo& isolation_info, std::vector<mojom::HttpHeaderPtr> additional_headers, int32_t process_id, const url::Origin& origin, uint32_t options, const net::MutableNetworkTrafficAnnotationTag& traffic_annotation, mojo::PendingRemote<mojom::WebSocketHandshakeClient> handshake_client, mojo::PendingRemote<mojom::URLLoaderNetworkServiceObserver> url_loader_network_observer, mojo::PendingRemote<mojom::WebSocketAuthenticationHandler> auth_handler, mojo::PendingRemote<mojom::TrustedHeaderClient> header_client) override; void CreateQuicTransport( const GURL& url, const url::Origin& origin, const net::NetworkIsolationKey& network_isolation_key, std::vector<mojom::QuicTransportCertificateFingerprintPtr> fingerprints, mojo::PendingRemote<mojom::QuicTransportHandshakeClient> handshake_client) override; void CreateNetLogExporter( mojo::PendingReceiver<mojom::NetLogExporter> receiver) override; void ResolveHost( const net::HostPortPair& host, const net::NetworkIsolationKey& network_isolation_key, mojom::ResolveHostParametersPtr optional_parameters, mojo::PendingRemote<mojom::ResolveHostClient> response_client) override; void CreateHostResolver( const base::Optional<net::DnsConfigOverrides>& config_overrides, mojo::PendingReceiver<mojom::HostResolver> receiver) override; void VerifyCertForSignedExchange( const scoped_refptr<net::X509Certificate>& certificate, const GURL& url, const net::NetworkIsolationKey& network_isolation_key, const std::string& ocsp_result, const std::string& sct_list, VerifyCertForSignedExchangeCallback callback) override; void ParseHeaders(const GURL& url, const scoped_refptr<net::HttpResponseHeaders>& headers, ParseHeadersCallback callback) override; void AddHSTS(const std::string& host, base::Time expiry, bool include_subdomains, AddHSTSCallback callback) override; void IsHSTSActiveForHost(const std::string& host, IsHSTSActiveForHostCallback callback) override; void GetHSTSState(const std::string& domain, GetHSTSStateCallback callback) override; void DeleteDynamicDataForHost( const std::string& host, DeleteDynamicDataForHostCallback callback) override; void SetCorsOriginAccessListsForOrigin( const url::Origin& source_origin, std::vector<mojom::CorsOriginPatternPtr> allow_patterns, std::vector<mojom::CorsOriginPatternPtr> block_patterns, SetCorsOriginAccessListsForOriginCallback callback) override; void EnableStaticKeyPinningForTesting( EnableStaticKeyPinningForTestingCallback callback) override; void VerifyCertificateForTesting( const scoped_refptr<net::X509Certificate>& certificate, const std::string& hostname, const std::string& ocsp_response, const std::string& sct_list, VerifyCertificateForTestingCallback callback) override; void PreconnectSockets( uint32_t num_streams, const GURL& url, bool allow_credentials, const net::NetworkIsolationKey& network_isolation_key) override; void CreateP2PSocketManager( const net::NetworkIsolationKey& network_isolation_key, mojo::PendingRemote<mojom::P2PTrustedSocketManagerClient> client, mojo::PendingReceiver<mojom::P2PTrustedSocketManager> trusted_socket_manager, mojo::PendingReceiver<mojom::P2PSocketManager> socket_manager_receiver) override; void CreateMdnsResponder( mojo::PendingReceiver<mojom::MdnsResponder> responder_receiver) override; void QueueReport(const std::string& type, const std::string& group, const GURL& url, const net::NetworkIsolationKey& network_isolation_key, const base::Optional<std::string>& user_agent, base::Value body) override; void QueueSignedExchangeReport( mojom::SignedExchangeReportPtr report, const net::NetworkIsolationKey& network_isolation_key) override; void AddDomainReliabilityContextForTesting( const GURL& origin, const GURL& upload_url, AddDomainReliabilityContextForTestingCallback callback) override; void ForceDomainReliabilityUploadsForTesting( ForceDomainReliabilityUploadsForTestingCallback callback) override; void SetSplitAuthCacheByNetworkIsolationKey( bool split_auth_cache_by_network_isolation_key) override; void SaveHttpAuthCacheProxyEntries( SaveHttpAuthCacheProxyEntriesCallback callback) override; void LoadHttpAuthCacheProxyEntries( const base::UnguessableToken& cache_key, LoadHttpAuthCacheProxyEntriesCallback callback) override; void AddAuthCacheEntry(const net::AuthChallengeInfo& challenge, const net::NetworkIsolationKey& network_isolation_key, const net::AuthCredentials& credentials, AddAuthCacheEntryCallback callback) override; // TODO(mmenke): Rename this method and update Mojo docs to make it clear this // doesn't give proxy auth credentials. void LookupServerBasicAuthCredentials( const GURL& url, const net::NetworkIsolationKey& network_isolation_key, LookupServerBasicAuthCredentialsCallback callback) override; #if BUILDFLAG(IS_CHROMEOS_ASH) void LookupProxyAuthCredentials( const net::ProxyServer& proxy_server, const std::string& auth_scheme, const std::string& realm, LookupProxyAuthCredentialsCallback callback) override; #endif void GetOriginPolicyManager( mojo::PendingReceiver<mojom::OriginPolicyManager> receiver) override; void SetOSCrypt(mojo::PendingRemote<pal::mojom::OSCrypt> os_crypt) override; // Destroys |request| when a proxy lookup completes. void OnProxyLookupComplete(ProxyLookupRequest* proxy_lookup_request); // Disables use of QUIC by the NetworkContext. void DisableQuic(); // Destroys the specified factory. Called by the factory itself when it has // no open pipes. void DestroyURLLoaderFactory(cors::CorsURLLoaderFactory* url_loader_factory); // Removes |transport| and destroys it. void Remove(QuicTransport* transport); // The following methods are used to track the number of requests per process // and ensure it doesn't go over a reasonable limit. void LoaderCreated(uint32_t process_id); void LoaderDestroyed(uint32_t process_id); bool CanCreateLoader(uint32_t process_id); void set_max_loaders_per_process_for_testing(uint32_t count) { max_loaders_per_process_ = count; } size_t GetNumOutstandingResolveHostRequestsForTesting() const; size_t pending_proxy_lookup_requests_for_testing() const { return proxy_lookup_requests_.size(); } NetworkServiceProxyDelegate* proxy_delegate() const { return proxy_delegate_; } void set_network_qualities_pref_delegate_for_testing( std::unique_ptr<NetworkQualitiesPrefDelegate> network_qualities_pref_delegate) { network_qualities_pref_delegate_ = std::move(network_qualities_pref_delegate); } cors::PreflightController* cors_preflight_controller() { return &cors_preflight_controller_; } // Returns true if reports should unconditionally be sent without first // consulting NetworkContextClient.OnCanSendReportingReports() bool SkipReportingPermissionCheck() const; // Creates a new url loader factory bound to this network context. For use // inside the network service. void CreateTrustedUrlLoaderFactoryForNetworkService( mojo::PendingReceiver<mojom::URLLoaderFactory> url_loader_factory_pending_receiver); mojom::OriginPolicyManager* origin_policy_manager() const { return origin_policy_manager_.get(); } domain_reliability::DomainReliabilityMonitor* domain_reliability_monitor() { return domain_reliability_monitor_.get(); } // The http_auth_dynamic_params_ would be used to populate // the |http_auth_merged_preferences| of the given NetworkContext. void OnHttpAuthDynamicParamsChanged( const mojom::HttpAuthDynamicParams* http_auth_dynamic_network_service_params); const net::HttpAuthPreferences* GetHttpAuthPreferences() const; size_t NumOpenQuicTransports() const; size_t num_url_loader_factories_for_testing() const { return url_loader_factories_.size(); } // Maintains Trust Tokens protocol state // (https://github.com/WICG/trust-token-api). Used by URLLoader to check // preconditions before annotating requests with protocol-related headers // and to store information conveyed in the corresponding responses. // // May return null if Trust Tokens support is disabled. PendingTrustTokenStore* trust_token_store() { return trust_token_store_.get(); } const PendingTrustTokenStore* trust_token_store() const { return trust_token_store_.get(); } WebBundleManager& GetWebBundleManager() { return web_bundle_manager_; } #if BUILDFLAG(IS_CT_SUPPORTED) void SetIsSCTAuditingEnabledForTesting(bool enabled) { is_sct_auditing_enabled_ = enabled; } #endif // BUILDFLAG(IS_CT_SUPPORTED) // Returns the current same-origin-policy exceptions. For more details see // network::mojom::NetworkContextParams::cors_origin_access_list and // network::mojom::NetworkContext::SetCorsOriginAccessListsForOrigin. const cors::OriginAccessList& cors_origin_access_list() { return cors_origin_access_list_; } bool require_network_isolation_key() const { return require_network_isolation_key_; } private: URLRequestContextOwner MakeURLRequestContext( mojo::PendingRemote<mojom::URLLoaderFactory> url_loader_factory_for_cert_net_fetcher, scoped_refptr<SessionCleanupCookieStore>); scoped_refptr<SessionCleanupCookieStore> MakeSessionCleanupCookieStore() const; // Invoked when the HTTP cache was cleared. Invokes |callback|. void OnHttpCacheCleared(ClearHttpCacheCallback callback, HttpCacheDataRemover* remover); void OnHostResolverShutdown(HostResolver* resolver); // Invoked when the computation for ComputeHttpCacheSize() has been completed, // to report result to user via |callback| and clean things up. void OnHttpCacheSizeComputed(ComputeHttpCacheSizeCallback callback, HttpCacheDataCounter* counter, bool is_upper_limit, int64_t result_or_error); // On connection errors the NetworkContext destroys itself. void OnConnectionError(); GURL GetHSTSRedirect(const GURL& original_url); void DestroySocketManager(P2PSocketManager* socket_manager); void CanUploadDomainReliability(const GURL& origin, base::OnceCallback<void(bool)> callback); void OnVerifyCertForSignedExchangeComplete(int cert_verify_id, int result); #if BUILDFLAG(IS_CHROMEOS_ASH) void TrustAnchorUsed(); #endif #if BUILDFLAG(IS_CT_SUPPORTED) void OnSetExpectCTTestReportSuccess(); void LazyCreateExpectCTReporter(net::URLRequestContext* url_request_context); void OnSetExpectCTTestReportFailure(); #endif // BUILDFLAG(IS_CT_SUPPORTED) void InitializeCorsParams(); // If |trust_token_store_| is backed by an asynchronously-constructed (e.g., // SQL-based) persistence layer, |FinishConstructingTrustTokenStore| // constructs and populates |trust_token_store_| once the persister's // asynchronous initialization has finished. void FinishConstructingTrustTokenStore( std::unique_ptr<SQLiteTrustTokenPersister> persister); NetworkService* const network_service_; mojo::Remote<mojom::NetworkContextClient> client_; std::unique_ptr<ResourceScheduler> resource_scheduler_; // Holds owning pointer to |url_request_context_|. Will contain a nullptr for // |url_request_context| when the NetworkContextImpl doesn't own its own // URLRequestContext. URLRequestContextOwner url_request_context_owner_; net::URLRequestContext* url_request_context_; // Owned by URLRequestContext. NetworkServiceNetworkDelegate* network_delegate_ = nullptr; mojom::NetworkContextParamsPtr params_; // If non-null, called when the mojo pipe for the NetworkContext is closed. OnConnectionCloseCallback on_connection_close_callback_; #if defined(OS_ANDROID) std::unique_ptr<base::android::ApplicationStatusListener> app_status_listener_; #endif mojo::Receiver<mojom::NetworkContext> receiver_; std::unique_ptr<CookieManager> cookie_manager_; std::unique_ptr<SocketFactory> socket_factory_; mojo::UniqueReceiverSet<mojom::ProxyResolvingSocketFactory> proxy_resolving_socket_factories_; // See the comment for |trust_token_store()|. std::unique_ptr<PendingTrustTokenStore> trust_token_store_; // Ordering: this must be after |trust_token_store_| since the // HasTrustTokensAnswerers are provided non-owning pointers to // |trust_token_store_|. mojo::UniqueReceiverSet<mojom::HasTrustTokensAnswerer> has_trust_tokens_answerers_; #if !defined(OS_IOS) std::unique_ptr<WebSocketFactory> websocket_factory_; #endif // !defined(OS_IOS) // These must be below the URLRequestContext, so they're destroyed before it // is. std::vector<std::unique_ptr<HttpCacheDataRemover>> http_cache_data_removers_; std::vector<std::unique_ptr<HttpCacheDataCounter>> http_cache_data_counters_; std::set<std::unique_ptr<ProxyLookupRequest>, base::UniquePtrComparator> proxy_lookup_requests_; std::set<std::unique_ptr<QuicTransport>, base::UniquePtrComparator> quic_transports_; // A count of outstanding requests per initiating process. std::map<uint32_t, uint32_t> loader_count_per_process_; static constexpr uint32_t kMaxOutstandingRequestsPerProcess = 2700; uint32_t max_loaders_per_process_ = kMaxOutstandingRequestsPerProcess; base::flat_map<P2PSocketManager*, std::unique_ptr<P2PSocketManager>> socket_managers_; #if BUILDFLAG(ENABLE_MDNS) std::unique_ptr<MdnsResponderManager> mdns_responder_manager_; #endif // BUILDFLAG(ENABLE_MDNS) mojo::UniqueReceiverSet<mojom::NetLogExporter> net_log_exporter_receivers_; // Ordering: this must be after |cookie_manager_| since it points to its // CookieSettings object. mojo::UniqueReceiverSet<mojom::RestrictedCookieManager> restricted_cookie_manager_receivers_; int current_resource_scheduler_client_id_ = 0; // Owned by the URLRequestContext net::StaticHttpUserAgentSettings* user_agent_settings_ = nullptr; // Pointed to by the TransportSecurityState (owned by the // URLRequestContext), and must be disconnected from it before it's destroyed. std::unique_ptr<net::ReportSender> certificate_report_sender_; #if BUILDFLAG(IS_CT_SUPPORTED) std::unique_ptr<ExpectCTReporter> expect_ct_reporter_; std::unique_ptr<certificate_transparency::ChromeRequireCTDelegate> require_ct_delegate_; std::queue<SetExpectCTTestReportCallback> outstanding_set_expect_ct_callbacks_; bool is_sct_auditing_enabled_ = false; #endif // BUILDFLAG(IS_CT_SUPPORTED) #if BUILDFLAG(IS_CHROMEOS_ASH) CertVerifierWithTrustAnchors* cert_verifier_with_trust_anchors_ = nullptr; #endif // CertNetFetcher used by the context's CertVerifier. May be nullptr if // CertNetFetcher is not used by the current platform, or if the actual // net::CertVerifier is instantiated outside of the network service. scoped_refptr<net::CertNetFetcherURLRequest> cert_net_fetcher_; // Created on-demand. Null if unused. std::unique_ptr<HostResolver> internal_host_resolver_; // Map values set to non-null only if that HostResolver has its own private // internal net::HostResolver. std::map<std::unique_ptr<HostResolver>, std::unique_ptr<net::HostResolver>, base::UniquePtrComparator> host_resolvers_; std::unique_ptr<net::HostResolver::ProbeRequest> doh_probes_request_; NetworkServiceProxyDelegate* proxy_delegate_ = nullptr; // Used for Signed Exchange certificate verification. int next_cert_verify_id_ = 0; struct PendingCertVerify { PendingCertVerify(); ~PendingCertVerify(); // CertVerifyResult must be freed after the Request has been destructed. // So |result| must be written before |request|. std::unique_ptr<net::CertVerifyResult> result; std::unique_ptr<net::CertVerifier::Request> request; VerifyCertForSignedExchangeCallback callback; scoped_refptr<net::X509Certificate> certificate; GURL url; net::NetworkIsolationKey network_isolation_key; std::string ocsp_result; std::string sct_list; }; std::map<int, std::unique_ptr<PendingCertVerify>> cert_verifier_requests_; // Manages allowed origin access lists. cors::OriginAccessList cors_origin_access_list_; // Manages header keys that are allowed to be used in // ResourceRequest::cors_exempt_headers. base::flat_set<std::string> cors_exempt_header_list_; // Manages CORS preflight requests and its cache. cors::PreflightController cors_preflight_controller_; std::unique_ptr<NetworkQualitiesPrefDelegate> network_qualities_pref_delegate_; std::unique_ptr<domain_reliability::DomainReliabilityMonitor> domain_reliability_monitor_; std::unique_ptr<OriginPolicyManager> origin_policy_manager_; // Each network context holds its own HttpAuthPreferences. // The dynamic preferences of |NetworkService| and the static // preferences from |NetworkContext| would be merged to // `http_auth_merged_preferences_` which would then be used to create // HttpAuthHandle via |NetworkContext::CreateHttpAuthHandlerFactory|. net::HttpAuthPreferences http_auth_merged_preferences_; // Each network context holds its own WebBundleManager, which // manages the lifetiem of a WebBundleURLLoaderFactory object. WebBundleManager web_bundle_manager_; // Whether all external consumers are expected to provide a non-empty // NetworkIsolationKey with all requests. When set, enabled a variety of // DCHECKs on APIs used by external callers. bool require_network_isolation_key_ = false; // CorsURLLoaderFactory assumes that fields owned by the NetworkContext always // live longer than the factory. Therefore we want the factories to be // destroyed before other fields above. In particular: // - This must be below |url_request_context_| so that the URLRequestContext // outlives all the URLLoaderFactories and URLLoaders that depend on it; // for the same reason, it must also be below |network_context_|. // - This must be below |loader_count_per_process_| that is touched by // CorsURLLoaderFactory::DestroyURLLoader (see also // https://crbug.com/1174943). std::set<std::unique_ptr<cors::CorsURLLoaderFactory>, base::UniquePtrComparator> url_loader_factories_; std::unique_ptr<cookie_config::CookieNevaCryptoDelegate> cookie_crypto_delegate_; base::WeakPtrFactory<NetworkContext> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(NetworkContext); }; } // namespace network #endif // SERVICES_NETWORK_NETWORK_CONTEXT_H_
[ "youngsoo.choi@lge.com" ]
youngsoo.choi@lge.com
28317b17c6040004ce6c82171b9ddbd696d805af
84068756756de93455cf7cbd4149caf9afc92f4d
/counter_test_desktop/linux/my_application.cc
22afd476c770a5e9eb0d564fb0f585cb456f888e
[]
no_license
andresgcarmona/flutter-examples
61476a14d5f1580491e92fe4935151a35ffa5c33
2d93fd2da27cff349db2f3e3896336cb4fbd1e17
refs/heads/master
2022-12-07T03:29:07.702188
2020-09-04T23:36:52
2020-09-04T23:36:52
292,966,487
3
0
null
null
null
null
UTF-8
C++
false
false
1,437
cc
#include "my_application.h" #include <flutter_linux/flutter_linux.h> #include "flutter/generated_plugin_registrant.h" struct _MyApplication { GtkApplication parent_instance; }; G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) // Implements GApplication::activate. static void my_application_activate(GApplication* application) { GtkWindow* window = GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application))); GtkHeaderBar *header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); gtk_widget_show(GTK_WIDGET(header_bar)); gtk_header_bar_set_title(header_bar, "counter_test_desktop"); gtk_header_bar_set_show_close_button(header_bar, TRUE); gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); gtk_window_set_default_size(window, 1280, 720); gtk_widget_show(GTK_WIDGET(window)); g_autoptr(FlDartProject) project = fl_dart_project_new(); FlView* view = fl_view_new(project); gtk_widget_show(GTK_WIDGET(view)); gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); fl_register_plugins(FL_PLUGIN_REGISTRY(view)); gtk_widget_grab_focus(GTK_WIDGET(view)); } static void my_application_class_init(MyApplicationClass* klass) { G_APPLICATION_CLASS(klass)->activate = my_application_activate; } static void my_application_init(MyApplication* self) {} MyApplication* my_application_new() { return MY_APPLICATION(g_object_new(my_application_get_type(), nullptr)); }
[ "ing.andres.carmona@gmail.com" ]
ing.andres.carmona@gmail.com
ee8375023328588727d52086712717213d5841d9
0d5862200f1fb20bbe2e0d0bfd2f29928a5049e0
/demos/sinescroll/sim/main_sinescroll.cpp
6b1164f6a848b4497ee86c129681fa118256c167
[ "MIT", "LicenseRef-scancode-free-unknown" ]
permissive
projf/projf-explore
4e0b1f2f188adb8b16e401bf7ecc705a2225bd7d
ff5633e8a1ca5638831e1fbaf3c9654d13d014c9
refs/heads/main
2023-09-05T21:00:50.419479
2023-08-05T12:22:38
2023-08-05T12:22:38
258,746,878
436
55
MIT
2023-08-05T12:22:40
2020-04-25T10:21:33
SystemVerilog
UTF-8
C++
false
false
3,726
cpp
// Project F: Sine Scroller Verilator C++ // (C)2023 Will Green, open source software released under the MIT License // Learn more at https://projectf.io/posts/sinescroll/ #include <stdio.h> #include <SDL.h> #include <verilated.h> #include "Vtop_sinescroll.h" // screen dimensions const int H_RES = 640; const int V_RES = 480; const int FULLSCREEN = false; typedef struct Pixel { // for SDL texture uint8_t a; // transparency uint8_t b; // blue uint8_t g; // green uint8_t r; // red } Pixel; int main(int argc, char* argv[]) { Verilated::commandArgs(argc, argv); if (SDL_Init(SDL_INIT_VIDEO) < 0) { printf("SDL init failed.\n"); return 1; } Pixel screenbuffer[H_RES*V_RES]; SDL_Window* sdl_window = NULL; SDL_Renderer* sdl_renderer = NULL; SDL_Texture* sdl_texture = NULL; sdl_window = SDL_CreateWindow("Sine Scroller", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, H_RES, V_RES, SDL_WINDOW_SHOWN); if (!sdl_window) { printf("Window creation failed: %s\n", SDL_GetError()); return 1; } if (FULLSCREEN) SDL_SetWindowFullscreen(sdl_window, SDL_WINDOW_FULLSCREEN); sdl_renderer = SDL_CreateRenderer(sdl_window, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC); if (!sdl_renderer) { printf("Renderer creation failed: %s\n", SDL_GetError()); return 1; } sdl_texture = SDL_CreateTexture(sdl_renderer, SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_TARGET, H_RES, V_RES); if (!sdl_texture) { printf("Texture creation failed: %s\n", SDL_GetError()); return 1; } // reference SDL keyboard state array: https://wiki.libsdl.org/SDL_GetKeyboardState const Uint8 *keyb_state = SDL_GetKeyboardState(NULL); printf("Simulation running. Press 'Q' in simulation window to quit.\n\n"); // initialize Verilog module Vtop_sinescroll* top = new Vtop_sinescroll; // reset top->rst_pix = 1; top->clk_pix = 0; top->eval(); top->clk_pix = 1; top->eval(); top->rst_pix = 0; top->clk_pix = 0; top->eval(); uint64_t frame_count = 0; uint64_t start_ticks = SDL_GetPerformanceCounter(); while (1) { // cycle the clock top->clk_pix = 1; top->eval(); top->clk_pix = 0; top->eval(); // update pixel if not in blanking interval if (top->sdl_de) { Pixel* p = &screenbuffer[top->sdl_sy*H_RES + top->sdl_sx]; p->a = 0xFF; // transparency p->b = top->sdl_b; p->g = top->sdl_g; p->r = top->sdl_r; } // update texture once per frame (in blanking) if (top->sdl_frame) { // check for quit event SDL_Event e; if (SDL_PollEvent(&e)) { if (e.type == SDL_QUIT) { break; } } if (keyb_state[SDL_SCANCODE_Q]) break; // quit if user presses 'Q' SDL_UpdateTexture(sdl_texture, NULL, screenbuffer, H_RES*sizeof(Pixel)); SDL_RenderClear(sdl_renderer); SDL_RenderCopy(sdl_renderer, sdl_texture, NULL, NULL); SDL_RenderPresent(sdl_renderer); frame_count++; } } uint64_t end_ticks = SDL_GetPerformanceCounter(); double duration = ((double)(end_ticks-start_ticks))/SDL_GetPerformanceFrequency(); double fps = (double)frame_count/duration; printf("Frames per second: %.1f\n", fps); top->final(); // simulation done SDL_DestroyTexture(sdl_texture); SDL_DestroyRenderer(sdl_renderer); SDL_DestroyWindow(sdl_window); SDL_Quit(); return 0; }
[ "noreply@github.com" ]
projf.noreply@github.com
47067aff24bc4a8138717301394617cde5b98d84
80ea2ec75f3505931c6643a4159f5784d24f7112
/src/folly/src/Format.cpp
5e77978515b1d1f3fc6264a4b22a1dd4737c3a75
[]
no_license
ksmurph1/VulkanConfigurator
843c6282b5eb75c9bcf5d0501ba2ff2b293fc930
986992a8b963a6b271785a77d5efd349b6e6ea4f
refs/heads/master
2023-03-30T14:11:27.417840
2021-04-03T20:57:28
2021-04-03T20:57:28
270,752,561
0
0
null
null
null
null
UTF-8
C++
false
false
11,976
cpp
/* * Copyright 2012-present Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "Format.h" #include <cassert> #include "ConstexprMath.h" #include "CppAttributes.h" #include "container/Array.h" #include <double-conversion/double-conversion.h> namespace folly { namespace detail { // ctor for items in the align table struct format_table_align_make_item { static constexpr std::size_t size = 256; constexpr FormatArg::Align operator()(std::size_t index) const { // clang-format off return index == '<' ? FormatArg::Align::LEFT: index == '>' ? FormatArg::Align::RIGHT : index == '=' ? FormatArg::Align::PAD_AFTER_SIGN : index == '^' ? FormatArg::Align::CENTER : FormatArg::Align::INVALID; // clang-format on } }; // ctor for items in the conv tables for representing parts of nonnegative // integers into ascii digits of length Size, over a given base Base template <std::size_t Base, std::size_t Size, bool Upper = false> struct format_table_conv_make_item { static_assert(Base <= 36, "Base is unrepresentable"); struct make_item { std::size_t index{}; constexpr explicit make_item(std::size_t index_) : index(index_) {} // gcc49 constexpr char alpha(std::size_t ord) const { return static_cast<char>( ord < 10 ? '0' + ord : (Upper ? 'A' : 'a') + (ord - 10)); } constexpr char operator()(std::size_t offset) const { return alpha(index / constexpr_pow(Base, Size - offset - 1) % Base); } }; constexpr std::array<char, Size> operator()(std::size_t index) const { return make_array_with<Size>(make_item{index}); } }; // ctor for items in the sign table struct format_table_sign_make_item { static constexpr std::size_t size = 256; constexpr FormatArg::Sign operator()(std::size_t index) const { // clang-format off return index == '+' ? FormatArg::Sign::PLUS_OR_MINUS : index == '-' ? FormatArg::Sign::MINUS : index == ' ' ? FormatArg::Sign::SPACE_OR_MINUS : FormatArg::Sign::INVALID; // clang-format on } }; // the tables FOLLY_STORAGE_CONSTEXPR auto formatAlignTable = make_array_with<256>(format_table_align_make_item{}); FOLLY_STORAGE_CONSTEXPR auto formatSignTable = make_array_with<256>(format_table_sign_make_item{}); FOLLY_STORAGE_CONSTEXPR decltype(formatHexLower) formatHexLower = make_array_with<256>(format_table_conv_make_item<16, 2, false>{}); FOLLY_STORAGE_CONSTEXPR decltype(formatHexUpper) formatHexUpper = make_array_with<256>(format_table_conv_make_item<16, 2, true>{}); FOLLY_STORAGE_CONSTEXPR decltype(formatOctal) formatOctal = make_array_with<512>(format_table_conv_make_item<8, 3>{}); FOLLY_STORAGE_CONSTEXPR decltype(formatBinary) formatBinary = make_array_with<256>(format_table_conv_make_item<2, 8>{}); } // namespace detail using namespace folly::detail; void FormatValue<double>::formatHelper( fbstring& piece, int& prefixLen, FormatArg& arg) const { using ::double_conversion::DoubleToStringConverter; using ::double_conversion::StringBuilder; arg.validate(FormatArg::Type::FLOAT); if (arg.presentation == FormatArg::kDefaultPresentation) { arg.presentation = 'g'; } const char* infinitySymbol = isupper(arg.presentation) ? "INF" : "inf"; const char* nanSymbol = isupper(arg.presentation) ? "NAN" : "nan"; char exponentSymbol = isupper(arg.presentation) ? 'E' : 'e'; if (arg.precision == FormatArg::kDefaultPrecision) { arg.precision = 6; } // 2+: for null terminator and optional sign shenanigans. constexpr int bufLen = 2 + constexpr_max(2 + DoubleToStringConverter::kMaxFixedDigitsBeforePoint + DoubleToStringConverter::kMaxFixedDigitsAfterPoint, constexpr_max( 8 + DoubleToStringConverter::kMaxExponentialDigits, 7 + DoubleToStringConverter::kMaxPrecisionDigits)); char buf[bufLen]; StringBuilder builder(buf + 1, bufLen - 1); char plusSign; switch (arg.sign) { case FormatArg::Sign::PLUS_OR_MINUS: plusSign = '+'; break; case FormatArg::Sign::SPACE_OR_MINUS: plusSign = ' '; break; default: plusSign = '\0'; break; }; auto flags = DoubleToStringConverter::EMIT_POSITIVE_EXPONENT_SIGN | (arg.trailingDot ? DoubleToStringConverter::EMIT_TRAILING_DECIMAL_POINT : 0); double val = val_; switch (arg.presentation) { case '%': val *= 100; FOLLY_FALLTHROUGH; case 'f': case 'F': { if (arg.precision > DoubleToStringConverter::kMaxFixedDigitsAfterPoint) { arg.precision = DoubleToStringConverter::kMaxFixedDigitsAfterPoint; } DoubleToStringConverter conv( flags, infinitySymbol, nanSymbol, exponentSymbol, -4, arg.precision, 0, 0); arg.enforce( conv.ToFixed(val, arg.precision, &builder), "fixed double conversion failed"); break; } case 'e': case 'E': { if (arg.precision > DoubleToStringConverter::kMaxExponentialDigits) { arg.precision = DoubleToStringConverter::kMaxExponentialDigits; } DoubleToStringConverter conv( flags, infinitySymbol, nanSymbol, exponentSymbol, -4, arg.precision, 0, 0); arg.enforce(conv.ToExponential(val, arg.precision, &builder)); break; } case 'n': // should be locale-aware, but isn't case 'g': case 'G': { if (arg.precision < DoubleToStringConverter::kMinPrecisionDigits) { arg.precision = DoubleToStringConverter::kMinPrecisionDigits; } else if (arg.precision > DoubleToStringConverter::kMaxPrecisionDigits) { arg.precision = DoubleToStringConverter::kMaxPrecisionDigits; } DoubleToStringConverter conv( flags, infinitySymbol, nanSymbol, exponentSymbol, -4, arg.precision, 0, 0); arg.enforce(conv.ToShortest(val, &builder)); break; } default: arg.error("invalid specifier '", arg.presentation, "'"); } auto len = builder.position(); builder.Finalize(); assert(len > 0); // Add '+' or ' ' sign if needed char* p = buf + 1; // anything that's neither negative nor nan prefixLen = 0; if (plusSign && (*p != '-' && *p != 'n' && *p != 'N')) { *--p = plusSign; ++len; prefixLen = 1; } else if (*p == '-') { prefixLen = 1; } piece = fbstring(p, size_t(len)); } void FormatArg::initSlow() { auto b = fullArgString.begin(); auto end = fullArgString.end(); // Parse key auto p = static_cast<const char*>(memchr(b, ':', size_t(end - b))); if (!p) { key_ = StringPiece(b, end); return; } key_ = StringPiece(b, p); if (*p == ':') { // parse format spec if (++p == end) { return; } // fill/align, or just align Align a; if (p + 1 != end && (a = formatAlignTable[static_cast<unsigned char>(p[1])]) != Align::INVALID) { fill = *p; align = a; p += 2; if (p == end) { return; } } else if ( (a = formatAlignTable[static_cast<unsigned char>(*p)]) != Align::INVALID) { align = a; if (++p == end) { return; } } Sign s; unsigned char uSign = static_cast<unsigned char>(*p); if ((s = formatSignTable[uSign]) != Sign::INVALID) { sign = s; if (++p == end) { return; } } if (*p == '#') { basePrefix = true; if (++p == end) { return; } } if (*p == '0') { enforce(align == Align::DEFAULT, "alignment specified twice"); fill = '0'; align = Align::PAD_AFTER_SIGN; if (++p == end) { return; } } auto readInt = [&] { auto const c = p; do { ++p; } while (p != end && *p >= '0' && *p <= '9'); return to<int>(StringPiece(c, p)); }; if (*p == '*') { width = kDynamicWidth; ++p; if (p == end) { return; } if (*p >= '0' && *p <= '9') { widthIndex = readInt(); } if (p == end) { return; } } else if (*p >= '0' && *p <= '9') { width = readInt(); if (p == end) { return; } } if (*p == ',') { thousandsSeparator = true; if (++p == end) { return; } } if (*p == '.') { auto d = ++p; while (p != end && *p >= '0' && *p <= '9') { ++p; } if (p != d) { precision = to<int>(StringPiece(d, p)); if (p != end && *p == '.') { trailingDot = true; ++p; } } else { trailingDot = true; } if (p == end) { return; } } presentation = *p; if (++p == end) { return; } } error("extra characters in format string"); } void FormatArg::validate(Type type) const { enforce(keyEmpty(), "index not allowed"); switch (type) { case Type::INTEGER: enforce( precision == kDefaultPrecision, "precision not allowed on integers"); break; case Type::FLOAT: enforce( !basePrefix, "base prefix ('#') specifier only allowed on integers"); enforce( !thousandsSeparator, "thousands separator (',') only allowed on integers"); break; case Type::OTHER: enforce( align != Align::PAD_AFTER_SIGN, "'='alignment only allowed on numbers"); enforce(sign == Sign::DEFAULT, "sign specifier only allowed on numbers"); enforce( !basePrefix, "base prefix ('#') specifier only allowed on integers"); enforce( !thousandsSeparator, "thousands separator (',') only allowed on integers"); break; } } namespace detail { void insertThousandsGroupingUnsafe(char* start_buffer, char** end_buffer) { uint32_t remaining_digits = uint32_t(*end_buffer - start_buffer); uint32_t separator_size = (remaining_digits - 1) / 3; uint32_t result_size = remaining_digits + separator_size; *end_buffer = *end_buffer + separator_size; // get the end of the new string with the separators uint32_t buffer_write_index = result_size - 1; uint32_t buffer_read_index = remaining_digits - 1; start_buffer[buffer_write_index + 1] = 0; bool done = false; uint32_t next_group_size = 3; while (!done) { uint32_t current_group_size = std::max<uint32_t>( 1, std::min<uint32_t>(remaining_digits, next_group_size)); // write out the current group's digits to the buffer index for (uint32_t i = 0; i < current_group_size; i++) { start_buffer[buffer_write_index--] = start_buffer[buffer_read_index--]; } // if not finished, write the separator before the next group if (buffer_write_index < buffer_write_index + 1) { start_buffer[buffer_write_index--] = ','; } else { done = true; } remaining_digits -= current_group_size; } } } // namespace detail FormatKeyNotFoundException::FormatKeyNotFoundException(StringPiece key) : std::out_of_range(kMessagePrefix.str() + key.str()) {} constexpr StringPiece const FormatKeyNotFoundException::kMessagePrefix; } // namespace folly
[ "ksmurph1@gmail.com" ]
ksmurph1@gmail.com
81435a40eb8faf06d0dcba59c3978166e3f3146e
e7bd9ad58b8163c4b5bd2e7cadad396a5a392ceb
/src/ui/linux/TogglDesktop/colorpicker.cpp
2e157f4aac4e779e22376809c6b1cd23e4ac6030
[ "BSD-2-Clause" ]
permissive
NghiaTranUIT/toggldesktop
becd430873859017fa6cba7b5e2593906dafde8b
4bdd1c2664db25af0bf9e5b7bd3f9d6ce27c57d1
refs/heads/master
2020-04-07T07:18:14.523470
2018-12-03T12:19:19
2018-12-03T12:19:19
158,171,293
0
0
BSD-3-Clause
2018-11-19T09:42:50
2018-11-19T06:16:25
C++
UTF-8
C++
false
false
1,796
cpp
// Copyright 2016 Toggl Desktop developers. #include <QGraphicsDropShadowEffect> #include "colorpicker.h" #include "ui_colorpicker.h" #include "timeentryeditorwidget.h" ColorPicker::ColorPicker(QWidget *parent) : QDialog(parent), ui(new Ui::ColorPicker) { ui->setupUi(this); setModal(true); setWindowTitle("Color Select"); setWindowFlags( Qt::Popup ); // Add shadow setAttribute(Qt::WA_TranslucentBackground); //enable MainWindow to be transparent QGraphicsDropShadowEffect* effect = new QGraphicsDropShadowEffect(); effect->setOffset(0); effect->setBlurRadius(5); ui->verticalWidget->setGraphicsEffect(effect); } ColorPicker::~ColorPicker() { delete ui; } void ColorPicker::setColors(QVector<char *> list) { int row = 0; int cell = 0; for (int i = 0; i < list.size(); i++) { QPushButton* colorButton = new QPushButton(this); colorButton->setText(QString("■")); colorButton->setMinimumSize(QSize(20, 20)); colorButton->setMaximumSize(QSize(20, 20)); colorButton->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); QString style = "color:" + QString::fromUtf8(list.at(i)) + ";"; colorButton->setStyleSheet(style); connect(colorButton,SIGNAL(clicked()),this,SLOT(color_clicked())); ui->gridLayout->addWidget(colorButton,row,cell); cell++; // Keep 5 items in 1 row if ((i+1) % 5 == 0) { row++; cell = 0; } } } void ColorPicker::color_clicked() { QString color = ((QPushButton*)sender())->styleSheet(); TimeEntryEditorWidget *p =(TimeEntryEditorWidget*)parent(); p->setSelectedColor(color); close(); } void ColorPicker::on_closeButton_clicked() { close(); }
[ "indzuliin@gmail.com" ]
indzuliin@gmail.com
087c13efd16b619c18249e36c996bde5a72a1dc2
dd80a584130ef1a0333429ba76c1cee0eb40df73
/external/eigen/test/jacobisvd.cpp
f6c567829dd717add037fab95aca619a9e300a9e
[ "GPL-3.0-only", "MPL-2.0", "LGPL-2.0-or-later", "Minpack", "BSD-3-Clause", "LGPL-3.0-only", "MIT" ]
permissive
karunmatharu/Android-4.4-Pay-by-Data
466f4e169ede13c5835424c78e8c30ce58f885c1
fcb778e92d4aad525ef7a995660580f948d40bc9
refs/heads/master
2021-03-24T13:33:01.721868
2017-02-18T17:48:49
2017-02-18T17:48:49
81,847,777
0
2
MIT
2020-03-09T00:02:12
2017-02-13T16:47:00
null
UTF-8
C++
false
false
12,801
cpp
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr> // Copyright (C) 2009 Benoit Jacob <jacob.benoit.1@gmail.com> // // This Source Code Form is subject to the terms of the Mozilla // Public License v. 2.0. If a copy of the MPL was not distributed // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. // discard stack allocation as that too bypasses malloc #define EIGEN_STACK_ALLOCATION_LIMIT 0 #define EIGEN_RUNTIME_NO_MALLOC #include "main.h" #include <Eigen/SVD> template<typename MatrixType, int QRPreconditioner> void jacobisvd_check_full(const MatrixType& m, const JacobiSVD<MatrixType, QRPreconditioner>& svd) { typedef typename MatrixType::Index Index; Index rows = m.rows(); Index cols = m.cols(); enum { RowsAtCompileTime = MatrixType::RowsAtCompileTime, ColsAtCompileTime = MatrixType::ColsAtCompileTime }; typedef typename MatrixType::Scalar Scalar; typedef typename NumTraits<Scalar>::Real RealScalar; typedef Matrix<Scalar, RowsAtCompileTime, RowsAtCompileTime> MatrixUType; typedef Matrix<Scalar, ColsAtCompileTime, ColsAtCompileTime> MatrixVType; typedef Matrix<Scalar, RowsAtCompileTime, 1> ColVectorType; typedef Matrix<Scalar, ColsAtCompileTime, 1> InputVectorType; MatrixType sigma = MatrixType::Zero(rows,cols); sigma.diagonal() = svd.singularValues().template cast<Scalar>(); MatrixUType u = svd.matrixU(); MatrixVType v = svd.matrixV(); VERIFY_IS_APPROX(m, u * sigma * v.adjoint()); VERIFY_IS_UNITARY(u); VERIFY_IS_UNITARY(v); } template<typename MatrixType, int QRPreconditioner> void jacobisvd_compare_to_full(const MatrixType& m, unsigned int computationOptions, const JacobiSVD<MatrixType, QRPreconditioner>& referenceSvd) { typedef typename MatrixType::Index Index; Index rows = m.rows(); Index cols = m.cols(); Index diagSize = (std::min)(rows, cols); JacobiSVD<MatrixType, QRPreconditioner> svd(m, computationOptions); VERIFY_IS_APPROX(svd.singularValues(), referenceSvd.singularValues()); if(computationOptions & ComputeFullU) VERIFY_IS_APPROX(svd.matrixU(), referenceSvd.matrixU()); if(computationOptions & ComputeThinU) VERIFY_IS_APPROX(svd.matrixU(), referenceSvd.matrixU().leftCols(diagSize)); if(computationOptions & ComputeFullV) VERIFY_IS_APPROX(svd.matrixV(), referenceSvd.matrixV()); if(computationOptions & ComputeThinV) VERIFY_IS_APPROX(svd.matrixV(), referenceSvd.matrixV().leftCols(diagSize)); } template<typename MatrixType, int QRPreconditioner> void jacobisvd_solve(const MatrixType& m, unsigned int computationOptions) { typedef typename MatrixType::Scalar Scalar; typedef typename MatrixType::Index Index; Index rows = m.rows(); Index cols = m.cols(); enum { RowsAtCompileTime = MatrixType::RowsAtCompileTime, ColsAtCompileTime = MatrixType::ColsAtCompileTime }; typedef Matrix<Scalar, RowsAtCompileTime, Dynamic> RhsType; typedef Matrix<Scalar, ColsAtCompileTime, Dynamic> SolutionType; RhsType rhs = RhsType::Random(rows, internal::random<Index>(1, cols)); JacobiSVD<MatrixType, QRPreconditioner> svd(m, computationOptions); SolutionType x = svd.solve(rhs); // evaluate normal equation which works also for least-squares solutions VERIFY_IS_APPROX(m.adjoint()*m*x,m.adjoint()*rhs); } template<typename MatrixType, int QRPreconditioner> void jacobisvd_test_all_computation_options(const MatrixType& m) { if (QRPreconditioner == NoQRPreconditioner && m.rows() != m.cols()) return; JacobiSVD<MatrixType, QRPreconditioner> fullSvd(m, ComputeFullU|ComputeFullV); jacobisvd_check_full(m, fullSvd); jacobisvd_solve<MatrixType, QRPreconditioner>(m, ComputeFullU | ComputeFullV); if(QRPreconditioner == FullPivHouseholderQRPreconditioner) return; jacobisvd_compare_to_full(m, ComputeFullU, fullSvd); jacobisvd_compare_to_full(m, ComputeFullV, fullSvd); jacobisvd_compare_to_full(m, 0, fullSvd); if (MatrixType::ColsAtCompileTime == Dynamic) { // thin U/V are only available with dynamic number of columns jacobisvd_compare_to_full(m, ComputeFullU|ComputeThinV, fullSvd); jacobisvd_compare_to_full(m, ComputeThinV, fullSvd); jacobisvd_compare_to_full(m, ComputeThinU|ComputeFullV, fullSvd); jacobisvd_compare_to_full(m, ComputeThinU , fullSvd); jacobisvd_compare_to_full(m, ComputeThinU|ComputeThinV, fullSvd); jacobisvd_solve<MatrixType, QRPreconditioner>(m, ComputeFullU | ComputeThinV); jacobisvd_solve<MatrixType, QRPreconditioner>(m, ComputeThinU | ComputeFullV); jacobisvd_solve<MatrixType, QRPreconditioner>(m, ComputeThinU | ComputeThinV); // test reconstruction typedef typename MatrixType::Index Index; Index diagSize = (std::min)(m.rows(), m.cols()); JacobiSVD<MatrixType, QRPreconditioner> svd(m, ComputeThinU | ComputeThinV); VERIFY_IS_APPROX(m, svd.matrixU().leftCols(diagSize) * svd.singularValues().asDiagonal() * svd.matrixV().leftCols(diagSize).adjoint()); } } template<typename MatrixType> void jacobisvd(const MatrixType& a = MatrixType(), bool pickrandom = true) { MatrixType m = pickrandom ? MatrixType::Random(a.rows(), a.cols()) : a; jacobisvd_test_all_computation_options<MatrixType, FullPivHouseholderQRPreconditioner>(m); jacobisvd_test_all_computation_options<MatrixType, ColPivHouseholderQRPreconditioner>(m); jacobisvd_test_all_computation_options<MatrixType, HouseholderQRPreconditioner>(m); jacobisvd_test_all_computation_options<MatrixType, NoQRPreconditioner>(m); } template<typename MatrixType> void jacobisvd_verify_assert(const MatrixType& m) { typedef typename MatrixType::Scalar Scalar; typedef typename MatrixType::Index Index; Index rows = m.rows(); Index cols = m.cols(); enum { RowsAtCompileTime = MatrixType::RowsAtCompileTime, ColsAtCompileTime = MatrixType::ColsAtCompileTime }; typedef Matrix<Scalar, RowsAtCompileTime, 1> RhsType; RhsType rhs(rows); JacobiSVD<MatrixType> svd; VERIFY_RAISES_ASSERT(svd.matrixU()) VERIFY_RAISES_ASSERT(svd.singularValues()) VERIFY_RAISES_ASSERT(svd.matrixV()) VERIFY_RAISES_ASSERT(svd.solve(rhs)) MatrixType a = MatrixType::Zero(rows, cols); a.setZero(); svd.compute(a, 0); VERIFY_RAISES_ASSERT(svd.matrixU()) VERIFY_RAISES_ASSERT(svd.matrixV()) svd.singularValues(); VERIFY_RAISES_ASSERT(svd.solve(rhs)) if (ColsAtCompileTime == Dynamic) { svd.compute(a, ComputeThinU); svd.matrixU(); VERIFY_RAISES_ASSERT(svd.matrixV()) VERIFY_RAISES_ASSERT(svd.solve(rhs)) svd.compute(a, ComputeThinV); svd.matrixV(); VERIFY_RAISES_ASSERT(svd.matrixU()) VERIFY_RAISES_ASSERT(svd.solve(rhs)) JacobiSVD<MatrixType, FullPivHouseholderQRPreconditioner> svd_fullqr; VERIFY_RAISES_ASSERT(svd_fullqr.compute(a, ComputeFullU|ComputeThinV)) VERIFY_RAISES_ASSERT(svd_fullqr.compute(a, ComputeThinU|ComputeThinV)) VERIFY_RAISES_ASSERT(svd_fullqr.compute(a, ComputeThinU|ComputeFullV)) } else { VERIFY_RAISES_ASSERT(svd.compute(a, ComputeThinU)) VERIFY_RAISES_ASSERT(svd.compute(a, ComputeThinV)) } } template<typename MatrixType> void jacobisvd_method() { enum { Size = MatrixType::RowsAtCompileTime }; typedef typename MatrixType::RealScalar RealScalar; typedef Matrix<RealScalar, Size, 1> RealVecType; MatrixType m = MatrixType::Identity(); VERIFY_IS_APPROX(m.jacobiSvd().singularValues(), RealVecType::Ones()); VERIFY_RAISES_ASSERT(m.jacobiSvd().matrixU()); VERIFY_RAISES_ASSERT(m.jacobiSvd().matrixV()); VERIFY_IS_APPROX(m.jacobiSvd(ComputeFullU|ComputeFullV).solve(m), m); } // work around stupid msvc error when constructing at compile time an expression that involves // a division by zero, even if the numeric type has floating point template<typename Scalar> EIGEN_DONT_INLINE Scalar zero() { return Scalar(0); } // workaround aggressive optimization in ICC template<typename T> EIGEN_DONT_INLINE T sub(T a, T b) { return a - b; } template<typename MatrixType> void jacobisvd_inf_nan() { // all this function does is verify we don't iterate infinitely on nan/inf values JacobiSVD<MatrixType> svd; typedef typename MatrixType::Scalar Scalar; Scalar some_inf = Scalar(1) / zero<Scalar>(); VERIFY(sub(some_inf, some_inf) != sub(some_inf, some_inf)); svd.compute(MatrixType::Constant(10,10,some_inf), ComputeFullU | ComputeFullV); Scalar some_nan = zero<Scalar>() / zero<Scalar>(); VERIFY(some_nan != some_nan); svd.compute(MatrixType::Constant(10,10,some_nan), ComputeFullU | ComputeFullV); MatrixType m = MatrixType::Zero(10,10); m(internal::random<int>(0,9), internal::random<int>(0,9)) = some_inf; svd.compute(m, ComputeFullU | ComputeFullV); m = MatrixType::Zero(10,10); m(internal::random<int>(0,9), internal::random<int>(0,9)) = some_nan; svd.compute(m, ComputeFullU | ComputeFullV); } // Regression test for bug 286: JacobiSVD loops indefinitely with some // matrices containing denormal numbers. void jacobisvd_bug286() { #if defined __INTEL_COMPILER // shut up warning #239: floating point underflow #pragma warning push #pragma warning disable 239 #endif Matrix2d M; M << -7.90884e-313, -4.94e-324, 0, 5.60844e-313; #if defined __INTEL_COMPILER #pragma warning pop #endif JacobiSVD<Matrix2d> svd; svd.compute(M); // just check we don't loop indefinitely } void jacobisvd_preallocate() { Vector3f v(3.f, 2.f, 1.f); MatrixXf m = v.asDiagonal(); internal::set_is_malloc_allowed(false); VERIFY_RAISES_ASSERT(VectorXf v(10);) JacobiSVD<MatrixXf> svd; internal::set_is_malloc_allowed(true); svd.compute(m); VERIFY_IS_APPROX(svd.singularValues(), v); JacobiSVD<MatrixXf> svd2(3,3); internal::set_is_malloc_allowed(false); svd2.compute(m); internal::set_is_malloc_allowed(true); VERIFY_IS_APPROX(svd2.singularValues(), v); VERIFY_RAISES_ASSERT(svd2.matrixU()); VERIFY_RAISES_ASSERT(svd2.matrixV()); svd2.compute(m, ComputeFullU | ComputeFullV); VERIFY_IS_APPROX(svd2.matrixU(), Matrix3f::Identity()); VERIFY_IS_APPROX(svd2.matrixV(), Matrix3f::Identity()); internal::set_is_malloc_allowed(false); svd2.compute(m); internal::set_is_malloc_allowed(true); JacobiSVD<MatrixXf> svd3(3,3,ComputeFullU|ComputeFullV); internal::set_is_malloc_allowed(false); svd2.compute(m); internal::set_is_malloc_allowed(true); VERIFY_IS_APPROX(svd2.singularValues(), v); VERIFY_IS_APPROX(svd2.matrixU(), Matrix3f::Identity()); VERIFY_IS_APPROX(svd2.matrixV(), Matrix3f::Identity()); internal::set_is_malloc_allowed(false); svd2.compute(m, ComputeFullU|ComputeFullV); internal::set_is_malloc_allowed(true); } void test_jacobisvd() { CALL_SUBTEST_3(( jacobisvd_verify_assert(Matrix3f()) )); CALL_SUBTEST_4(( jacobisvd_verify_assert(Matrix4d()) )); CALL_SUBTEST_7(( jacobisvd_verify_assert(MatrixXf(10,12)) )); CALL_SUBTEST_8(( jacobisvd_verify_assert(MatrixXcd(7,5)) )); for(int i = 0; i < g_repeat; i++) { Matrix2cd m; m << 0, 1, 0, 1; CALL_SUBTEST_1(( jacobisvd(m, false) )); m << 1, 0, 1, 0; CALL_SUBTEST_1(( jacobisvd(m, false) )); Matrix2d n; n << 0, 0, 0, 0; CALL_SUBTEST_2(( jacobisvd(n, false) )); n << 0, 0, 0, 1; CALL_SUBTEST_2(( jacobisvd(n, false) )); CALL_SUBTEST_3(( jacobisvd<Matrix3f>() )); CALL_SUBTEST_4(( jacobisvd<Matrix4d>() )); CALL_SUBTEST_5(( jacobisvd<Matrix<float,3,5> >() )); CALL_SUBTEST_6(( jacobisvd<Matrix<double,Dynamic,2> >(Matrix<double,Dynamic,2>(10,2)) )); int r = internal::random<int>(1, 30), c = internal::random<int>(1, 30); CALL_SUBTEST_7(( jacobisvd<MatrixXf>(MatrixXf(r,c)) )); CALL_SUBTEST_8(( jacobisvd<MatrixXcd>(MatrixXcd(r,c)) )); (void) r; (void) c; // Test on inf/nan matrix CALL_SUBTEST_7( jacobisvd_inf_nan<MatrixXf>() ); } CALL_SUBTEST_7(( jacobisvd<MatrixXf>(MatrixXf(internal::random<int>(EIGEN_TEST_MAX_SIZE/4, EIGEN_TEST_MAX_SIZE/2), internal::random<int>(EIGEN_TEST_MAX_SIZE/4, EIGEN_TEST_MAX_SIZE/2))) )); CALL_SUBTEST_8(( jacobisvd<MatrixXcd>(MatrixXcd(internal::random<int>(EIGEN_TEST_MAX_SIZE/4, EIGEN_TEST_MAX_SIZE/3), internal::random<int>(EIGEN_TEST_MAX_SIZE/4, EIGEN_TEST_MAX_SIZE/3))) )); // test matrixbase method CALL_SUBTEST_1(( jacobisvd_method<Matrix2cd>() )); CALL_SUBTEST_3(( jacobisvd_method<Matrix3f>() )); // Test problem size constructors CALL_SUBTEST_7( JacobiSVD<MatrixXf>(10,10) ); // Check that preallocation avoids subsequent mallocs CALL_SUBTEST_9( jacobisvd_preallocate() ); // Regression check for bug 286 CALL_SUBTEST_2( jacobisvd_bug286() ); }
[ "karun.matharu@gmail.com" ]
karun.matharu@gmail.com
3d0cbe5cbcfcafaacc9956c3349f95e7a3fd4e6e
ca5f51c4fecdb3cca7ffc0544c17de0c412086f8
/Dynamic programming/partition-a-set-into-two-subsets-such-that-the-difference-of-subset-sums-is-minimum.cpp
141166192e2e807958ea4f9bbe8d77d4fa4a87d7
[]
no_license
avinashw50w/ds_algo
f517bbb326a922258e6ef7816e6c06593a2d06aa
bc73bd617486ab8fcbbdd8a076cacd3761c6c954
refs/heads/master
2023-07-22T17:44:44.815336
2023-07-13T07:38:22
2023-07-13T07:38:22
193,303,550
0
3
null
null
null
null
UTF-8
C++
false
false
3,093
cpp
/*Recursive Solution (good for checking an containing both positive and negative numbers) The recursive approach is to generate all possible sums from all the values of array and to check which solution is the most optimal one. To generate sums we either include the i’th item in set 1 or don’t include, i.e., include in set 2.*/ // Function to find the minimum sum int findMinRec(int arr[], int i, int sumCalculated, int sumTotal) { // If we have reached last element. Sum of one // subset is sumCalculated, sum of other subset is // sumTotal-sumCalculated. Return absolute difference // of two sums. if (i==0) return abs(sumTotal - 2*sumCalculated); // For every item arr[i], we have two choices // (1) We do not include it first set // (2) We include it in first set // We return minimum of two choices return min(findMinRec(arr, i-1, sumCalculated+arr[i-1], sumTotal), findMinRec(arr, i-1, sumCalculated, sumTotal)); } // Returns minimum possible difference between sums // of two subsets int findMin(int arr[], int n) { // Compute total sum of elements int sumTotal = 0; for (int i=0; i<n; i++) sumTotal += arr[i]; // Compute result using recursive function return findMinRec(arr, n, 0, sumTotal); } ///////////////////////////////////////////////////////////////////////////////// //good only if the array contains only positive numbers // Returns the minimum value of the difference of the two sets. int findMin(int arr[], int n) { // Calculate sum of all elements int sum = 0; for (int i = 0; i < n; i++) sum += arr[i]; // Create an array to store results of subproblems bool dp[n+1][sum+1]; // Initialize first column as true. 0 sum is possible // with all elements. for (int i = 0; i <= n; i++) dp[i][0] = true; // Initialize top row, except dp[0][0], as false. With // 0 elements, no other sum except 0 is possible for (int i = 1; i <= sum; i++) dp[0][i] = false; // Fill the partition table in bottom up manner for (int i=1; i<=n; i++) { for (int j=1; j<=sum; j++) { // If i'th element is excluded dp[i][j] = dp[i-1][j]; // If i'th element is included if (arr[i-1] <= j) dp[i][j] |= dp[i-1][j-arr[i-1]]; } } // Initialize difference of two sums. int diff = INT_MAX; // Find the largest j such that dp[n][j] // is true where j loops from sum/2 t0 0 for (int j=sum/2; j>=0; j--) { // Find the if (dp[n][j] == true) { diff = sum-2*j; break; } } return diff; } // Driver program to test above function int main() { int arr[] = {3, 1, 4, 2, 2, 1}; int n = sizeof(arr)/sizeof(arr[0]); cout << "The minimum difference between 2 sets is " << findMin(arr, n); return 0; }
[ "avinash.kumar@seenit.in" ]
avinash.kumar@seenit.in
55c7afa8f5599ee489e74f62de6afb060824ce9d
97f8be92810bafdbf68b77c8a938411462d5be4b
/tests/IResearch/IResearchPrimaryKeyReuse-test.cpp
89b3fceb79b1a593311f5783d78c2ee10914ad00
[ "Apache-2.0", "BSD-3-Clause", "ICU", "LGPL-2.1-or-later", "BSD-4-Clause", "GPL-1.0-or-later", "Python-2.0", "OpenSSL", "Bison-exception-2.2", "JSON", "ISC", "GPL-2.0-only", "MIT", "BSL-1.0", "LicenseRef-scancode-public-domain", "CC0-1.0", "BSD-2-Clause", "LicenseRef-scancode-autoconf-simple-exception", "LicenseRef-scancode-pcre", "LicenseRef-scancode-unknown-license-reference", "Zlib" ]
permissive
solisoft/arangodb
022fefd77ca704bfa4ca240e6392e3afebdb474e
efd5a33bb1ad1ae3b63bfe1f9ce09b16116f62a2
refs/heads/main
2021-12-24T16:50:38.171240
2021-11-30T11:52:58
2021-11-30T11:52:58
436,619,840
2
0
Apache-2.0
2021-12-09T13:05:46
2021-12-09T13:05:46
null
UTF-8
C++
false
false
16,210
cpp
//////////////////////////////////////////////////////////////////////////////// /// DISCLAIMER /// /// Copyright 2014-2020 ArangoDB GmbH, Cologne, Germany /// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany /// /// Licensed under the Apache License, Version 2.0 (the "License"); /// you may not use this file except in compliance with the License. /// You may obtain a copy of the License at /// /// http://www.apache.org/licenses/LICENSE-2.0 /// /// Unless required by applicable law or agreed to in writing, software /// distributed under the License is distributed on an "AS IS" BASIS, /// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. /// See the License for the specific language governing permissions and /// limitations under the License. /// /// Copyright holder is ArangoDB GmbH, Cologne, Germany /// /// @author Andrey Abramov /// @author Vasiliy Nabatchikov //////////////////////////////////////////////////////////////////////////////// #include "IResearchQueryCommon.h" #include "IResearch/IResearchView.h" #include "Transaction/StandaloneContext.h" #include "Utils/OperationOptions.h" #include "Utils/SingleCollectionTransaction.h" #include "VocBase/LogicalCollection.h" #include <velocypack/Iterator.h> extern const char* ARGV0; // defined in main.cpp namespace { static const VPackBuilder systemDatabaseBuilder = dbArgsBuilder(); static const VPackSlice systemDatabaseArgs = systemDatabaseBuilder.slice(); // ----------------------------------------------------------------------------- // --SECTION-- setup / tear-down // ----------------------------------------------------------------------------- class IResearchPrimaryKeyReuse : public IResearchQueryTest {}; } // namespace // ----------------------------------------------------------------------------- // --SECTION-- test suite // ----------------------------------------------------------------------------- //////////////////////////////////////////////////////////////////////////////// /// @brief setup //////////////////////////////////////////////////////////////////////////////// TEST_F(IResearchPrimaryKeyReuse, test_multiple_transactions_sequential) { TRI_vocbase_t vocbase(TRI_vocbase_type_e::TRI_VOCBASE_TYPE_NORMAL, testDBInfo(server.server())); std::vector<arangodb::velocypack::Builder> insertedDocs; arangodb::LogicalView* view; std::shared_ptr<arangodb::LogicalCollection> collection; // create collection0 { auto createJson = VPackParser::fromJson( "{ \"name\": \"testCollection0\"," " \"usesRevisionsAsDocumentIds\": true }"); collection = vocbase.createCollection(createJson->slice()); ASSERT_NE(nullptr, collection); } // create view { auto createJson = VPackParser::fromJson( "{ \"name\": \"testView\", \"type\": \"arangosearch\" }"); auto logicalView = vocbase.createView(createJson->slice()); ASSERT_FALSE(!logicalView); view = logicalView.get(); auto* impl = dynamic_cast<arangodb::iresearch::IResearchView*>(view); ASSERT_FALSE(!impl); auto updateJson = VPackParser::fromJson( "{ \"links\": {" "\"testCollection0\": { \"analyzers\": [ \"test_analyzer\", " "\"identity\" ], \"includeAllFields\": true, \"trackListPositions\": " "true, \"storeValues\":\"id\" }" "}}"); EXPECT_TRUE(impl->properties(updateJson->slice(), true).ok()); std::set<arangodb::DataSourceId> cids; impl->visitCollections([&cids](arangodb::DataSourceId cid) -> bool { cids.emplace(cid); return true; }); EXPECT_EQ(1, cids.size()); EXPECT_EQ(TRI_ERROR_NO_ERROR, arangodb::tests::executeQuery( vocbase, "FOR d IN testView SEARCH 1 == 1 " "OPTIONS { waitForSync: true } RETURN d") .result.errorNumber()); // commit } // insert initial document { std::vector<std::shared_ptr<arangodb::velocypack::Builder>> docs{ VPackParser::fromJson( "{ \"value\": true }") }; arangodb::OperationOptions options; options.returnNew = true; arangodb::SingleCollectionTransaction trx(arangodb::transaction::StandaloneContext::Create(vocbase), *collection, arangodb::AccessMode::Type::WRITE); EXPECT_TRUE(trx.begin().ok()); for (auto& entry : docs) { auto res = trx.insert(collection->name(), entry->slice(), options); EXPECT_TRUE(res.ok()); insertedDocs.emplace_back(res.slice().get("new")); } EXPECT_TRUE(trx.commit().ok()); } // remove-insert loop for (std::size_t i = 0; i < 5; ++i) { // remove { arangodb::OperationOptions options; arangodb::SingleCollectionTransaction trx(arangodb::transaction::StandaloneContext::Create(vocbase), *collection, arangodb::AccessMode::Type::WRITE); EXPECT_TRUE(trx.begin().ok()); for (auto& entry : insertedDocs) { auto res = trx.remove(collection->name(), entry.slice(), options); EXPECT_TRUE(res.ok()); } EXPECT_TRUE(trx.commit().ok()); } EXPECT_EQ(TRI_ERROR_NO_ERROR, arangodb::tests::executeQuery( vocbase, "FOR d IN testView SEARCH d.value == true " "OPTIONS { waitForSync: true } RETURN d") .result.errorNumber()); // commit // reinsert with _rev and isRestore == true { arangodb::OperationOptions options; options.returnNew = true; options.isRestore = true; arangodb::SingleCollectionTransaction trx(arangodb::transaction::StandaloneContext::Create(vocbase), *collection, arangodb::AccessMode::Type::WRITE); EXPECT_TRUE(trx.begin().ok()); for (auto& entry : insertedDocs) { auto res = trx.insert(collection->name(), entry.slice(), options); EXPECT_TRUE(res.ok()); EXPECT_EQ(res.slice().get("new").get(arangodb::StaticStrings::RevString).copyString(), entry.slice().get(arangodb::StaticStrings::RevString).copyString()); } EXPECT_TRUE(trx.commit().ok()); } EXPECT_EQ(TRI_ERROR_NO_ERROR, arangodb::tests::executeQuery( vocbase, "FOR d IN testView SEARCH d.value == true " "OPTIONS { waitForSync: true } RETURN d") .result.errorNumber()); // commit } } TEST_F(IResearchPrimaryKeyReuse, test_multiple_transactions_interleaved) { TRI_vocbase_t vocbase(TRI_vocbase_type_e::TRI_VOCBASE_TYPE_NORMAL, testDBInfo(server.server())); std::vector<arangodb::velocypack::Builder> insertedDocs; std::vector<arangodb::velocypack::Builder> extraDocs; arangodb::LogicalView* view; std::shared_ptr<arangodb::LogicalCollection> collection; // create collection0 { auto createJson = VPackParser::fromJson( "{ \"name\": \"testCollection0\"," " \"usesRevisionsAsDocumentIds\": true }"); collection = vocbase.createCollection(createJson->slice()); ASSERT_NE(nullptr, collection); } // create view { auto createJson = VPackParser::fromJson( "{ \"name\": \"testView\", \"type\": \"arangosearch\" }"); auto logicalView = vocbase.createView(createJson->slice()); ASSERT_FALSE(!logicalView); view = logicalView.get(); auto* impl = dynamic_cast<arangodb::iresearch::IResearchView*>(view); ASSERT_FALSE(!impl); auto updateJson = VPackParser::fromJson( "{ \"links\": {" "\"testCollection0\": { \"analyzers\": [ \"test_analyzer\", " "\"identity\" ], \"includeAllFields\": true, \"trackListPositions\": " "true, \"storeValues\":\"id\" }" "}}"); EXPECT_TRUE(impl->properties(updateJson->slice(), true).ok()); std::set<arangodb::DataSourceId> cids; impl->visitCollections([&cids](arangodb::DataSourceId cid) -> bool { cids.emplace(cid); return true; }); EXPECT_EQ(1, cids.size()); EXPECT_EQ(TRI_ERROR_NO_ERROR, arangodb::tests::executeQuery( vocbase, "FOR d IN testView SEARCH 1 == 1 " "OPTIONS { waitForSync: true } RETURN d") .result.errorNumber()); // commit } std::vector<std::shared_ptr<arangodb::velocypack::Builder>> docs{ VPackParser::fromJson("{ \"value\": true }")}; // insert initial document { arangodb::OperationOptions options; options.returnNew = true; arangodb::SingleCollectionTransaction trx(arangodb::transaction::StandaloneContext::Create(vocbase), *collection, arangodb::AccessMode::Type::WRITE); EXPECT_TRUE(trx.begin().ok()); for (auto& entry : docs) { auto res = trx.insert(collection->name(), entry->slice(), options); EXPECT_TRUE(res.ok()); insertedDocs.emplace_back(res.slice().get("new")); } EXPECT_TRUE(trx.commit().ok()); } // remove-insert loop for (std::size_t i = 0; i < 5; ++i) { // remove { arangodb::OperationOptions options; arangodb::SingleCollectionTransaction trx( arangodb::transaction::StandaloneContext::Create(vocbase), *collection, arangodb::AccessMode::Type::WRITE); EXPECT_TRUE(trx.begin().ok()); for (auto& entry : insertedDocs) { auto res = trx.remove(collection->name(), entry.slice(), options); EXPECT_TRUE(res.ok()); } EXPECT_TRUE(trx.commit().ok()); } EXPECT_EQ(TRI_ERROR_NO_ERROR, arangodb::tests::executeQuery( vocbase, "FOR d IN testView SEARCH d.value == true " "OPTIONS { waitForSync: true } RETURN d") .result.errorNumber()); // commit // insert some extra doc { arangodb::OperationOptions options; options.returnNew = true; arangodb::SingleCollectionTransaction trx( arangodb::transaction::StandaloneContext::Create(vocbase), *collection, arangodb::AccessMode::Type::WRITE); EXPECT_TRUE(trx.begin().ok()); for (auto& entry : docs) { auto res = trx.insert(collection->name(), entry->slice(), options); EXPECT_TRUE(res.ok()); extraDocs.emplace_back(res.slice().get("new")); } EXPECT_TRUE(trx.commit().ok()); } // remove the extra { arangodb::OperationOptions options; arangodb::SingleCollectionTransaction trx( arangodb::transaction::StandaloneContext::Create(vocbase), *collection, arangodb::AccessMode::Type::WRITE); EXPECT_TRUE(trx.begin().ok()); for (auto& entry : extraDocs) { auto res = trx.remove(collection->name(), entry.slice(), options); EXPECT_TRUE(res.ok()); } EXPECT_TRUE(trx.commit().ok()); extraDocs.clear(); } // reinsert with _rev and isRestore == true { arangodb::OperationOptions options; options.returnNew = true; options.isRestore = true; arangodb::SingleCollectionTransaction trx( arangodb::transaction::StandaloneContext::Create(vocbase), *collection, arangodb::AccessMode::Type::WRITE); EXPECT_TRUE(trx.begin().ok()); for (auto& entry : insertedDocs) { auto res = trx.insert(collection->name(), entry.slice(), options); EXPECT_TRUE(res.ok()); EXPECT_EQ(res.slice().get("new").get(arangodb::StaticStrings::RevString).copyString(), entry.slice().get(arangodb::StaticStrings::RevString).copyString()); } EXPECT_TRUE(trx.commit().ok()); } EXPECT_EQ(TRI_ERROR_NO_ERROR, arangodb::tests::executeQuery( vocbase, "FOR d IN testView SEARCH d.value == true " "OPTIONS { waitForSync: true } RETURN d") .result.errorNumber()); // commit } } TEST_F(IResearchPrimaryKeyReuse, test_single_transaction) { TRI_vocbase_t vocbase(TRI_vocbase_type_e::TRI_VOCBASE_TYPE_NORMAL, testDBInfo(server.server())); std::vector<arangodb::velocypack::Builder> insertedDocs; arangodb::LogicalView* view; std::shared_ptr<arangodb::LogicalCollection> collection; // create collection0 { auto createJson = VPackParser::fromJson( "{ \"name\": \"testCollection0\"," " \"usesRevisionsAsDocumentIds\": true }"); collection = vocbase.createCollection(createJson->slice()); ASSERT_NE(nullptr, collection); } // create view { auto createJson = VPackParser::fromJson( "{ \"name\": \"testView\", \"type\": \"arangosearch\" }"); auto logicalView = vocbase.createView(createJson->slice()); ASSERT_FALSE(!logicalView); view = logicalView.get(); auto* impl = dynamic_cast<arangodb::iresearch::IResearchView*>(view); ASSERT_FALSE(!impl); auto updateJson = VPackParser::fromJson( "{ \"links\": {" "\"testCollection0\": { \"analyzers\": [ \"test_analyzer\", " "\"identity\" ], \"includeAllFields\": true, \"trackListPositions\": " "true, \"storeValues\":\"id\" }" "}}"); EXPECT_TRUE(impl->properties(updateJson->slice(), true).ok()); std::set<arangodb::DataSourceId> cids; impl->visitCollections([&cids](arangodb::DataSourceId cid) -> bool { cids.emplace(cid); return true; }); EXPECT_EQ(1, cids.size()); EXPECT_EQ(TRI_ERROR_NO_ERROR, arangodb::tests::executeQuery( vocbase, "FOR d IN testView SEARCH 1 == 1 " "OPTIONS { waitForSync: true } RETURN d") .result.errorNumber()); // commit } // insert initial document { std::vector<std::shared_ptr<arangodb::velocypack::Builder>> docs{ VPackParser::fromJson("{ \"value\": true }")}; arangodb::SingleCollectionTransaction trx(arangodb::transaction::StandaloneContext::Create(vocbase), *collection, arangodb::AccessMode::Type::WRITE); EXPECT_TRUE(trx.begin().ok()); for (auto& entry : docs) { arangodb::OperationOptions options; options.returnNew = true; auto res = trx.insert(collection->name(), entry->slice(), options); EXPECT_TRUE(res.ok()); insertedDocs.emplace_back(res.slice().get("new")); } // remove-insert loop for (std::size_t i = 0; i < 5; ++i) { // remove { arangodb::OperationOptions options; for (auto& entry : insertedDocs) { auto res = trx.remove(collection->name(), entry.slice(), options); EXPECT_TRUE(res.ok()); } } // reinsert with _rev and isRestore == true { arangodb::OperationOptions options; options.returnNew = true; options.isRestore = true; for (auto& entry : insertedDocs) { auto res = trx.insert(collection->name(), entry.slice(), options); EXPECT_TRUE(res.ok()); EXPECT_EQ( res.slice().get("new").get(arangodb::StaticStrings::RevString).copyString(), entry.slice().get(arangodb::StaticStrings::RevString).copyString()); } } } EXPECT_TRUE(trx.commit().ok()); EXPECT_EQ(TRI_ERROR_NO_ERROR, arangodb::tests::executeQuery( vocbase, "FOR d IN testView SEARCH d.value == true " "OPTIONS { waitForSync: true } RETURN d") .result.errorNumber()); // commit } }
[ "noreply@github.com" ]
solisoft.noreply@github.com
2ff3911eb79944c967f0cf2fcd5947ca3a7e0681
d05c7821a02fd69b979ae31dc4a18c712a14f949
/Classes/ui/scenes/WelcomeScene.h
8bd9545e071e273f87db57c3b35cac2f9d280e6d
[]
no_license
Toneyisnow/PixelPuzzle
f5b99afde0f22a2038d75f1ab2abf1db782ab4c0
e8bbfcbbc3ada8168a8a6b946fc279a5e746afe1
refs/heads/master
2022-12-12T18:23:53.166859
2019-07-07T00:55:48
2019-07-07T00:55:48
194,743,775
0
0
null
2022-12-08T05:46:40
2019-07-01T21:13:59
C++
UTF-8
C++
false
false
1,663
h
/**************************************************************************** Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ #ifndef __WELCOME_SCENE_H__ #define __WELCOME_SCENE_H__ #include "cocos2d.h" class WelcomeScene : public cocos2d::Scene { public: static cocos2d::Scene* createScene(); virtual bool init(); void onClickEnter(cocos2d::Ref* pSender); // implement the "static create()" method manually CREATE_FUNC(WelcomeScene); }; #endif // __HELLOWORLD_SCENE_H__
[ "charlie_5899@hotmail.com" ]
charlie_5899@hotmail.com
aa0a24505abe3131fcd7e257b2c65308f7b8753e
993ef8924418866f932396a58e3ad0c2a940ddd3
/Utils/src/HiddenSectorProducer.cc
eaceb5738abac3158666149b4d98c552e9538778
[]
no_license
TreeMaker/TreeMaker
48d81f6c95a17828dbb599d29c15137cd6ef009a
15dd7fe9e9e6f97d9e52614c900c27d200a6c45f
refs/heads/Run2_UL
2023-07-07T15:04:56.672709
2023-07-03T16:43:17
2023-07-03T16:43:17
29,192,343
16
92
null
2023-07-03T16:43:28
2015-01-13T13:59:30
Python
UTF-8
C++
false
false
20,238
cc
// system include files #include <memory> #include <vector> #include <cmath> #include <map> #include <tuple> #include <utility> #include <unordered_set> // user include files #include "FWCore/Framework/interface/Frameworkfwd.h" #include "FWCore/Framework/interface/EventSetup.h" #include "FWCore/Framework/interface/ESHandle.h" #include "FWCore/Framework/interface/global/EDProducer.h" #include "FWCore/Framework/interface/Event.h" #include "FWCore/Framework/interface/MakerMacros.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "TreeMaker/Utils/interface/lester_mt2_bisect.h" // new includes #include "DataFormats/JetReco/interface/GenJet.h" #include "DataFormats/PatCandidates/interface/Jet.h" #include "DataFormats/Candidate/interface/Candidate.h" #include "DataFormats/HepMCCandidate/interface/GenParticle.h" #include "DataFormats/PatCandidates/interface/MET.h" #include "DataFormats/Math/interface/deltaR.h" #include "DataFormats/Math/interface/deltaPhi.h" #include "DataFormats/Math/interface/LorentzVector.h" typedef math::XYZTLorentzVector LorentzVector; typedef std::unordered_set<unsigned> PidSet; typedef const reco::Candidate* CandPtr; typedef std::unordered_set<CandPtr> CandSet; //some daughters (primarily GenParticles) may be dropped from miniAOD //trying to access these daughers directly with the daughter() accessor will cause an exception: //InvalidID get by product ID: invalid ProductID supplied //to work around this, we check the corresponding edm::Ptr to see if its ProductID is valid template <typename T> CandPtr daughter_noexcept(const T& mother, unsigned i) { auto tmp = mother.daughterPtr(i); return tmp.id().isValid() ? &*tmp : nullptr; } class HiddenSectorProducer : public edm::global::EDProducer<> { public: explicit HiddenSectorProducer(const edm::ParameterSet&); private: void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const override; //helper double TransverseMass(double px1, double py1, double m1, double px2, double py2, double m2) const; template <class P> void addDaughters(const P* i_part, std::vector<CandPtr>& listOfDaughters) const; void fillSet(PidSet& IDset, const std::string& name, const edm::ParameterSet& iConfig); bool isParticle(const PidSet& darkList, CandPtr part) const; bool isParticle(const PidSet& darkList, int pid) const; bool isParticle(const CandSet& darkList, CandPtr part) const; bool isAncestor(const PidSet& darkList, CandPtr part) const; void medDecay(CandPtr part, CandSet& firstQdM, CandSet& firstQsM, CandPtr& firstQdM1, CandPtr& firstQdM2, CandPtr& firstQsM1, CandPtr& firstQsM2, bool& secondDM, bool& secondSM) const; void firstDark(CandPtr part, CandSet& firstMd, CandSet& firstQd, CandSet& firstGd, CandSet& firstQdM, CandSet& firstQsM, CandPtr& firstQdM1, CandPtr& firstQdM2, CandPtr& firstQsM1, CandPtr& firstQsM2, bool& secondDM, bool& secondSM) const; int checkLast(const reco::GenJet& jet, const CandSet& stableDs, int value, double& frac) const; int checkFirst(const reco::GenJet& jet, const CandSet& firstP, int value) const; double calculateMT2(const edm::Handle<edm::View<reco::GenMET>>& h_genmets, const reco::GenJet& dQM1J, const reco::GenJet& SMM1J, const reco::GenJet& dQM2J, const reco::GenJet& SMM2J) const; template <typename A, typename B> std::vector<int> matchAB(const A& collA, const B& collB) const; template <typename A, typename B> double deltaRAB(const A& candA, const B& candB) const; //looks like a specialization, but actually an overload... template <typename B> double deltaRAB(const reco::Candidate* candA, const B& candB) const; std::vector<int> matchGenRec(const edm::View<pat::Jet>& jets, const edm::View<reco::GenJet>& gen) const; bool signal_; edm::InputTag JetTag_, MetTag_, GenMetTag_, GenTag_, GenJetTag_; edm::EDGetTokenT<edm::View<pat::Jet>> JetTok_; edm::EDGetTokenT<edm::View<pat::MET>> MetTok_; edm::EDGetTokenT<edm::View<reco::GenMET>> GenMetTok_; edm::EDGetTokenT<edm::View<reco::GenParticle>> GenTok_; edm::EDGetTokenT<edm::View<reco::GenJet>> GenJetTok_; double coneSize_; PidSet DarkSMediatorIDs_, DarkTMediatorIDs_, DarkQuarkIDs_, DarkHadronIDs_, DarkGluonIDs_, DarkStableIDs_, DarkFirstIDs_, SMQuarkIDs_; }; void HiddenSectorProducer::fillSet(PidSet& IDset, const std::string& name, const edm::ParameterSet& iConfig){ const auto& ids = iConfig.getParameter<std::vector<unsigned>>(name); IDset.insert(ids.begin(),ids.end()); } bool HiddenSectorProducer::isParticle(const PidSet& darkList, CandPtr part) const { return isParticle(darkList, part->pdgId()); } bool HiddenSectorProducer::isParticle(const PidSet& darkList, int pid) const { return darkList.find(std::abs(pid)) != darkList.end(); } bool HiddenSectorProducer::isParticle(const CandSet& darkList, CandPtr part) const { return darkList.find(part) != darkList.end(); } bool HiddenSectorProducer::isAncestor(const PidSet& darkList, CandPtr part) const { if(isParticle(darkList, part)) return true; for(size_t i=0;i< part->numberOfMothers();i++) { if(isAncestor(darkList,part->mother(i))) return true; } return false; } // this function intends to collect immediate non-mediator daughters of the mediators. These mediator daughters can then be used to reconstruct the mass of the mediator. void HiddenSectorProducer::medDecay(CandPtr part, CandSet& firstQdM, CandSet& firstQsM, CandPtr& firstQdM1, CandPtr& firstQdM2, CandPtr& firstQsM1, CandPtr& firstQsM2, bool& secondDM, bool& secondSM) const { for(unsigned i = 0; i < part->numberOfDaughters(); i++){ CandPtr dau = part->daughter(i); // if the first dark mediator's daughter is still a dark mediator, then check the daughters of this daughter dark mediator until we get daughters that are not dark mediator if(isParticle(DarkTMediatorIDs_,dau)) medDecay(dau,firstQdM,firstQsM,firstQdM1,firstQdM2,firstQsM1,firstQsM2,secondDM,secondSM); else{ // a mediator decays into a dark and an SM quark. Here we are collecting the dark quarks from the mediators while labeling them firstQdM1 and firstQdM2 depending on which mediator the quarks came from. if(isParticle(DarkQuarkIDs_,dau)){ firstQdM.insert(dau); // this condition makes sure that the firstQdM1 (firstQdM2) and firstQsM1 (firstQsM2) came from the same mediator. // The labels 1 and 2 have no significance other than making sure that we get the correct pairings of dark and SM quarks from the mediators. if(secondDM == false){ firstQdM1 = dau; secondDM = true; } else firstQdM2 = dau; } // Here we are collecting the SM quarks from the mediators which assigning them to firstQsM1 and firstQsM2 depending on which mediator the quarks came from. else if(isParticle(SMQuarkIDs_,dau)){ firstQsM.insert(dau); if(secondSM == false){ firstQsM1 = dau; secondSM = true; } else firstQsM2 = dau; } } } } void HiddenSectorProducer::firstDark(CandPtr part, CandSet& firstMd, CandSet& firstQd, CandSet& firstGd, CandSet& firstQdM, CandSet& firstQsM, CandPtr& firstQdM1, CandPtr& firstQdM2, CandPtr& firstQsM1, CandPtr& firstQsM2, bool& secondDM, bool& secondSM) const { if(isParticle(DarkFirstIDs_,part)){ CandPtr parent = part->mother(0); if(isParticle(DarkFirstIDs_,parent)) firstDark(parent, firstMd, firstQd, firstGd, firstQdM, firstQsM, firstQdM1, firstQdM2, firstQsM1, firstQsM2, secondDM, secondSM); else{ // SM parent of first dark particles // looping through the daughters of this SM parent for(unsigned i = 0; i < part->numberOfDaughters(); i++){ CandPtr dau = part->daughter(i); if (isParticle(DarkTMediatorIDs_,dau)){ if(firstMd.find(dau)==firstMd.end()){ firstMd.insert(dau); // once a mediator daughter is found, we look for the descendants of the mediator medDecay(dau,firstQdM,firstQsM,firstQdM1,firstQdM2,firstQsM1,firstQsM2,secondDM,secondSM); } } else if (isParticle(DarkQuarkIDs_,dau)) firstQd.insert(dau); else if (isParticle(DarkGluonIDs_,dau)) firstGd.insert(dau); } } } } int HiddenSectorProducer::checkLast(const reco::GenJet& jet, const CandSet& stableDs, int value, double& frac) const { //compare jet constituents to set of last particles //also compute dark pt fraction in same loop bool match = false; LorentzVector p4; LorentzVector totPt = jet.p4(); for(unsigned i = 0; i < jet.numberOfDaughters(); ++i){ CandPtr dau = daughter_noexcept(jet,i); if(!dau) continue; if(isAncestor(DarkHadronIDs_,dau)){ match = true; p4 += dau->p4(); } } for(const auto& part : stableDs){ if(reco::deltaR(jet, *part) < coneSize_) { p4 += part->p4(); totPt += part->p4(); } } frac = p4.pt()/totPt.pt(); return match ? value : 0; } int HiddenSectorProducer::checkFirst(const reco::GenJet& jet, const CandSet& firstP, int value) const { //compare first particles using jet cone (can't compare constituents' parents because all dark hadrons descend from all first dark particles, strong force problems) for(const auto& part : firstP){ if(reco::deltaR(jet, *part) < coneSize_) return value; } return 0; } double HiddenSectorProducer::calculateMT2(const edm::Handle<edm::View<reco::GenMET>>& h_genmets, const reco::GenJet& dQM1J, const reco::GenJet& SMM1J, const reco::GenJet& dQM2J, const reco::GenJet& SMM2J) const { const auto& i_met = h_genmets->front(); double METx = i_met.px(); double METy = i_met.py(); LorentzVector FJet0 = dQM1J.p4() + SMM1J.p4(); LorentzVector FJet1 = dQM2J.p4() + SMM2J.p4(); return asymm_mt2_lester_bisect::get_mT2( FJet0.M(), FJet0.Px(), FJet0.Py(), FJet1.M(), FJet1.Px(), FJet1.Py(), METx, METy, 0.0, 0.0, 0 ); } //use official JetMET matching procedure: equiv to set<DR,jet_index,gen_index> sorted by DR //from https://github.com/cms-jet/JetMETAnalysis/blob/master/JetUtilities/plugins/MatchRecToGen.cc //returns index array of length A pointing to B template <typename A, typename B> std::vector<int> HiddenSectorProducer::matchAB(const A& collA, const B& collB) const { std::map<double,std::pair<unsigned,unsigned>> matchMap; for(unsigned a = 0; a < collA.size(); ++a){ for(unsigned b = 0; b < collB.size(); ++b){ matchMap.emplace(std::piecewise_construct, std::forward_as_tuple(deltaRAB(collA[a],collB[b])), std::forward_as_tuple(a,b)); } } std::vector<int> bIndex(collA.size(),-1); std::unordered_set<unsigned> a_used, b_used; for(const auto& matchItem: matchMap){ unsigned a = matchItem.second.first; unsigned b = matchItem.second.second; if(a_used.find(a)==a_used.end() and b_used.find(b)==b_used.end()){ bIndex[a] = b; a_used.insert(a); b_used.insert(b); } } return bIndex; } template <typename A, typename B> double HiddenSectorProducer::deltaRAB(const A& candA, const B& candB) const { return reco::deltaR(candA,candB); } template <typename B> double HiddenSectorProducer::deltaRAB(const reco::Candidate* candA, const B& candB) const { return reco::deltaR(*candA,candB); } HiddenSectorProducer::HiddenSectorProducer(const edm::ParameterSet& iConfig) : signal_(iConfig.getParameter<bool>("signal")), JetTag_(iConfig.getParameter<edm::InputTag>("JetTag")), MetTag_(iConfig.getParameter<edm::InputTag>("MetTag")), GenMetTag_(iConfig.getParameter<edm::InputTag>("GenMetTag")), GenTag_(iConfig.getParameter<edm::InputTag>("GenTag")), GenJetTag_(iConfig.getParameter<edm::InputTag>("GenJetTag")), JetTok_(consumes<edm::View<pat::Jet>>(JetTag_)), MetTok_(consumes<edm::View<pat::MET>>(MetTag_)), GenMetTok_(consumes<edm::View<reco::GenMET>>(GenMetTag_)), GenTok_(consumes<edm::View<reco::GenParticle>>(GenTag_)), GenJetTok_(consumes<edm::View<reco::GenJet>>(GenJetTag_)), coneSize_(iConfig.getParameter<double>("coneSize")) { fillSet(DarkSMediatorIDs_,"DarkSMediatorIDs",iConfig); fillSet(DarkTMediatorIDs_,"DarkTMediatorIDs",iConfig); fillSet(DarkQuarkIDs_,"DarkQuarkIDs",iConfig); fillSet(DarkHadronIDs_,"DarkHadronIDs",iConfig); fillSet(DarkGluonIDs_,"DarkGluonIDs",iConfig); fillSet(DarkStableIDs_,"DarkStableIDs",iConfig); fillSet(SMQuarkIDs_,"SMQuarkIDs",iConfig); //combined list of possible first particles DarkFirstIDs_.insert(DarkTMediatorIDs_.begin(),DarkTMediatorIDs_.end()); DarkFirstIDs_.insert(DarkQuarkIDs_.begin(),DarkQuarkIDs_.end()); DarkFirstIDs_.insert(DarkGluonIDs_.begin(),DarkGluonIDs_.end()); asymm_mt2_lester_bisect::disableCopyrightMessage(); produces<double>("MJJ"); produces<double>("Mmc"); produces<double>("MT"); produces<double>("GenMT2"); produces<double>("DeltaPhi1"); produces<double>("DeltaPhi2"); produces<double>("DeltaPhiMin"); if(signal_){ produces<std::vector<bool>>("isHV"); //first two branches for GenJetsAK8, last is for JetsAK8 (matching index) produces<std::vector<int>>("hvCategory"); produces<std::vector<double>>("darkPtFrac"); produces<std::vector<int>>("MT2JetsID"); produces<std::vector<int>>("genIndex"); } } double HiddenSectorProducer::TransverseMass(double px1, double py1, double m1, double px2, double py2, double m2) const { double E1 = std::sqrt(std::pow(px1,2)+std::pow(py1,2)+std::pow(m1,2)); double E2 = std::sqrt(std::pow(px2,2)+std::pow(py2,2)+std::pow(m2,2)); double MTsq = std::pow(E1+E2,2)-std::pow(px1+px2,2)-std::pow(py1+py2,2); return std::sqrt(std::max(MTsq,0.0)); } template <class P> void HiddenSectorProducer::addDaughters(const P* i_part, std::vector<CandPtr>& listOfDaughters) const { for (unsigned idau=0; idau < i_part->numberOfDaughters(); ++idau) { // add all daughters of HVquark to list CandPtr dau = i_part->daughter(idau); if(isParticle(DarkQuarkIDs_,dau)) addDaughters(dau,listOfDaughters); // recurse down to HV-quark copy's daughters else listOfDaughters.push_back(dau); } } void HiddenSectorProducer::produce(edm::StreamID, edm::Event& iEvent, const edm::EventSetup& iSetup) const { //get the collections edm::Handle<edm::View<pat::Jet>> h_jets; iEvent.getByToken(JetTok_, h_jets); edm::Handle<edm::View<pat::MET>> h_mets; iEvent.getByToken(MetTok_, h_mets); edm::Handle<edm::View<reco::GenMET>> h_genmets; iEvent.getByToken(GenMetTok_, h_genmets); edm::Handle<edm::View<reco::GenParticle>> h_parts; iEvent.getByToken(GenTok_, h_parts); edm::Handle<edm::View<reco::GenJet>> h_genjets; iEvent.getByToken(GenJetTok_, h_genjets); auto jet_isHV_vec = std::make_unique<std::vector<bool>>(); auto hvCategory = std::make_unique<std::vector<int>>(); auto darkPtFrac = std::make_unique<std::vector<double>>(); auto MT2JetsID = std::make_unique<std::vector<int>>(); auto genIndex = std::make_unique<std::vector<int>>(); LorentzVector vpartsSum; if(h_parts.isValid()){ for(const auto& i_part : *(h_parts.product())){ if(isParticle(DarkStableIDs_,i_part.pdgId())){ vpartsSum += i_part.p4(); } } } double MJJ = 0, Mmc = 0, MT = 0, GenMT2 = 0, DeltaPhi1 = 10, DeltaPhi2 = 10, DeltaPhiMin = 10; //only fill these parts if there are >=2 jets if(h_jets->size()>=2){ //delta phi DeltaPhi1 = std::abs(reco::deltaPhi(h_jets->at(0).phi(),h_mets->at(0).phi())); DeltaPhi2 = std::abs(reco::deltaPhi(h_jets->at(1).phi(),h_mets->at(0).phi())); DeltaPhiMin = std::min(DeltaPhi1,DeltaPhi2); //masses LorentzVector vjj = h_jets->at(0).p4()+h_jets->at(1).p4(); MJJ = vjj.M(); //include all jets in MC mass LorentzVector vmc = vjj + vpartsSum; Mmc = vmc.M(); //MET is massless, but jets aren't double MET = h_mets->at(0).pt(), METPhi = h_mets->at(0).phi(); MT = TransverseMass(vjj.Px(),vjj.Py(),vjj.M(),MET*std::cos(METPhi),MET*std::sin(METPhi),0); } //ISRJetProducer method, find jets with hard process particles at their 'core' and other jets are ISR if(signal_ and h_parts.isValid()){ for(const auto& i_jet : *(h_jets.product())){ // loop over AK8 jets bool matched = false; // matched == true means that this jet has a hard process (descendant particle of the Z') at its 'core' for (const auto& i_part : *(h_parts.product())){ // loop over GenParticles if (matched) break; // only need to match one particle to the jet to tag it as FSR if(i_part.status()!=23) continue; // only want particles outgoing from the hard process if(!isParticle(DarkSMediatorIDs_,i_part.mother())) continue; // only want direct descendants of Z' (kind of redundant) //check against daughters in case of hard initial splitting, from ISRJetProducer... std::vector<CandPtr> listOfDaughters; addDaughters(&i_part,listOfDaughters); for (const auto& daughter : listOfDaughters) { float dR = deltaR(i_jet, daughter->p4()); if(dR<0.8){ matched = true; break; } } } jet_isHV_vec->push_back(matched); } //t-channel jet categorization //gen particle organization: last daughters of last copies of dark hadrons, first copies of dark quarks/gluons/mediators, first copies of quarks/gluons/SM quarks from mediator //naming scheme: dark particles Pd, SM particles Ps; P = D (generic daughters), Q (quarks), G (gluons), M (mediators) CandSet stableDs, firstMd, firstQd, firstGd, firstQdM, firstQsM; CandPtr firstQdM1, firstQdM2, firstQsM1, firstQsM2; bool secondDM = false, secondSM = false; //loop over gen particles for(const auto& i_part : *(h_parts.product())){ firstDark(&i_part, firstMd, firstQd, firstGd, firstQdM, firstQsM, firstQdM1, firstQdM2, firstQsM1, firstQsM2,secondDM,secondSM); if(static_cast<const reco::GenParticle*>(&i_part)->isLastCopy() and isParticle(DarkStableIDs_,&i_part)) stableDs.insert(&i_part); } //loop over gen jets for(const auto& i_jet : *(h_genjets.product())){ int category = 0; double frac = 0; category += checkLast(i_jet, stableDs, 1, frac); category += checkFirst(i_jet, firstQd, 2); category += checkFirst(i_jet, firstGd, 4); category += checkFirst(i_jet, firstQdM, 8); category += checkFirst(i_jet, firstQsM, 16); hvCategory->push_back(category); darkPtFrac->push_back(frac); } std::vector<CandPtr> firsts{firstQdM1,firstQdM2,firstQsM1,firstQsM2}; std::vector<int> pgenIndex(firsts.size(),-1); *MT2JetsID = std::vector<int>(h_genjets->size(),-1); bool matchedAll = true; if(firstMd.size()==2){ pgenIndex = matchAB(firsts,*(h_genjets.product())); for(unsigned p = 0; p < pgenIndex.size(); ++p){ if(pgenIndex[p]>-1) MT2JetsID->at(pgenIndex[p]) = p+1; else matchedAll = false; } if(matchedAll) GenMT2 = calculateMT2(h_genmets,h_genjets->at(pgenIndex[0]),h_genjets->at(pgenIndex[2]),h_genjets->at(pgenIndex[1]),h_genjets->at(pgenIndex[3])); else GenMT2 = 0.; } //gen:reco jet matching *genIndex = matchAB(*(h_jets.product()), *(h_genjets.product())); } if(signal_){ iEvent.put(std::move(jet_isHV_vec),"isHV"); iEvent.put(std::move(hvCategory),"hvCategory"); iEvent.put(std::move(darkPtFrac),"darkPtFrac"); iEvent.put(std::move(MT2JetsID),"MT2JetsID"); iEvent.put(std::move(genIndex),"genIndex"); } auto pMJJ = std::make_unique<double>(MJJ); iEvent.put(std::move(pMJJ),"MJJ"); auto pMmc = std::make_unique<double>(Mmc); iEvent.put(std::move(pMmc),"Mmc"); auto pMT = std::make_unique<double>(MT); iEvent.put(std::move(pMT),"MT"); auto pMT2 = std::make_unique<double>(GenMT2); iEvent.put(std::move(pMT2),"GenMT2"); auto pDeltaPhi1 = std::make_unique<double>(DeltaPhi1); iEvent.put(std::move(pDeltaPhi1),"DeltaPhi1"); auto pDeltaPhi2 = std::make_unique<double>(DeltaPhi2); iEvent.put(std::move(pDeltaPhi2),"DeltaPhi2"); auto pDeltaPhiMin = std::make_unique<double>(DeltaPhiMin); iEvent.put(std::move(pDeltaPhiMin),"DeltaPhiMin"); } DEFINE_FWK_MODULE(HiddenSectorProducer);
[ "kpedro88@gmail.com" ]
kpedro88@gmail.com
d82a75c3f531b1c31e053197067b6f43a23379e6
bb62c6e70b7b536e658f2c045e224735fb2e9532
/src/plugins/opengl/src/constant_buffer_opengl.cpp
239886718b03453e0771fbd2baacc9e7de3d7d80
[ "Apache-2.0" ]
permissive
kariem2k/halley
b66173ef200e9b3479c433f6fd89f2e0a54f585f
6f2d09b06e49ec22ffc1457b7eda6bcd888b796d
refs/heads/master
2020-09-20T14:32:06.167665
2019-11-28T12:13:37
2019-11-28T12:15:19
224,511,194
1
0
Apache-2.0
2019-11-27T20:23:35
2019-11-27T20:23:35
null
UTF-8
C++
false
false
625
cpp
#include "constant_buffer_opengl.h" #include "halley/core/graphics/material/material_parameter.h" #include "halley/core/graphics/material/material_definition.h" #include "gl_utils.h" #include "halley/support/exception.h" #include "texture_opengl.h" using namespace Halley; ConstantBufferOpenGL::ConstantBufferOpenGL() { buffer.init(GL_UNIFORM_BUFFER); } ConstantBufferOpenGL::~ConstantBufferOpenGL() { } void ConstantBufferOpenGL::update(const MaterialDataBlock& dataBlock) { buffer.setData(dataBlock.getData()); } void ConstantBufferOpenGL::bind(int bindPoint) { buffer.bindToTarget(bindPoint); glCheckError(); }
[ "archmagezeratul@gmail.com" ]
archmagezeratul@gmail.com
d9fd9977d09a4ae52d1ffb7adb194462b7d14ad3
310faffd4b11ffb0287860e7150cd06e681e29c7
/game.cpp
69e6ee58ead7b1621fe4c70db1258df6804b1f47
[]
no_license
vishal22091997/Basic-Programming
370b2cde5e8192059172a558f9ee96e844672abc
e32743b75b42bcb8d56561bb514b883973da6800
refs/heads/master
2021-01-19T16:50:10.090072
2017-05-24T13:24:21
2017-05-24T13:24:21
88,290,755
0
0
null
null
null
null
UTF-8
C++
false
false
11,095
cpp
#include <stdio.h> #include <time.h> #include <stdlib.h> #include <conio.h> #include<time.h> #include<ctype.h> #include <time.h> #include <windows.h> #include <process.h> #define UP 72 #define DOWN 80 #define LEFT 75 #define RIGHT 77 int length; int bend_no; int len; char key; void record(); void load(); int life; void Delay(long double); void Move(); void Food(); int Score(); void Print(); void gotoxy(int x, int y); void GotoXY(int x,int y); void Bend(); void Boarder(); void Down(); void Left(); void Up(); void Right(); void ExitGame(); int Scoreonly(); struct coordinate{ int x; int y; int direction; }; typedef struct coordinate coordinate; coordinate head, bend[500],food,body[30]; int main() { char name[20]; char password[10]; printf("Enter Username: "); scanf("%s",name); printf("Enter password: "); scanf("%s",password); { if (strcmp(name, "Admin") == 0 && strcmp(password, "password") == 0) printf("Welcome to the game\n"); else printf("Please Quit the game\n Password Hint: pas*****"); getch(); } char key; Print(); system("cls"); load(); length=5; head.x=25; head.y=20; head.direction=RIGHT; Boarder(); Food(); //to generate food coordinates initially life=3; //number of extra lives bend[0]=head; Move(); //initialing initial bend coordinate return 0; } void Move() { int a,i; do{ Food(); fflush(stdin); len=0; for(i=0;i<30;i++) { body[i].x=0; body[i].y=0; if(i==length) break; } Delay(length); Boarder(); if(head.direction==RIGHT) Right(); else if(head.direction==LEFT) Left(); else if(head.direction==DOWN) Down(); else if(head.direction==UP) Up(); ExitGame(); }while(!kbhit()); a=getch(); if(a==27) { system("cls"); exit(0); } key=getch(); if((key==RIGHT&&head.direction!=LEFT&&head.direction!=RIGHT)||(key==LEFT&&head.direction!=RIGHT&&head.direction!=LEFT)||(key==UP&&head.direction!=DOWN&&head.direction!=UP)||(key==DOWN&&head.direction!=UP&&head.direction!=DOWN)) { bend_no++; bend[bend_no]=head; head.direction=key; if(key==UP) head.y--; if(key==DOWN) head.y++; if(key==RIGHT) head.x++; if(key==LEFT) head.x--; Move(); } else if(key==27) { system("cls"); exit(0); } else { printf("\a"); Move(); } } void gotoxy(int x, int y) { COORD coord; coord.X = x; coord.Y = y; SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord); } void GotoXY(int x, int y) { HANDLE a; COORD b; fflush(stdout); b.X = x; b.Y = y; a = GetStdHandle(STD_OUTPUT_HANDLE); SetConsoleCursorPosition(a,b); } void load(){ int row,col,r,c,q; gotoxy(36,14); printf("loading..."); gotoxy(30,15); for(r=1;r<=20;r++){ for(q=0;q<=100000000;q++);//to display the character slowly printf("%c",177);} getch(); } void Down() { int i; for(i=0;i<=(head.y-bend[bend_no].y)&&len<length;i++) { GotoXY(head.x,head.y-i); { if(len==0) printf("v"); else printf("*"); } body[len].x=head.x; body[len].y=head.y-i; len++; } Bend(); if(!kbhit()) head.y++; } void Delay(long double k) { Score(); long double i; for(i=0;i<=(10000000);i++); } void ExitGame() { int i,check=0; for(i=4;i<length;i++) //starts with 4 because it needs minimum 4 element to touch its own body { if(body[0].x==body[i].x&&body[0].y==body[i].y) { check++; //check's value increases as the coordinates of head is equal to any other body coordinate } if(i==length||check!=0) break; } if(head.x<=10||head.x>=70||head.y<=10||head.y>=30||check!=0) { life--; if(life>=0) { head.x=25; head.y=20; bend_no=0; head.direction=RIGHT; Move(); } else { system("cls"); printf("All lives completed\nBetter Luck Next Time!!!\nPress any key to quit the game\n"); record(); exit(0); } } } void Food() { if(head.x==food.x&&head.y==food.y) { length++; time_t a; a=time(0); srand(a); food.x=rand()%70; if(food.x<=10) food.x+=11; food.y=rand()%30; if(food.y<=10) food.y+=11; } else if(food.x==0)/*to create food for the first time coz global variable are initialized with 0*/ { food.x=rand()%70; if(food.x<=10) food.x+=11; food.y=rand()%30; if(food.y<=10) food.y+=11; } } void Left() { int i; for(i=0;i<=(bend[bend_no].x-head.x)&&len<length;i++) { GotoXY((head.x+i),head.y); { if(len==0) printf("<"); else printf("*"); } body[len].x=head.x+i; body[len].y=head.y; len++; } Bend(); if(!kbhit()) head.x--; } void Right() { int i; for(i=0;i<=(head.x-bend[bend_no].x)&&len<length;i++) { //GotoXY((head.x-i),head.y); body[len].x=head.x-i; body[len].y=head.y; GotoXY(body[len].x,body[len].y); { if(len==0) printf(">"); else printf("*"); } /*body[len].x=head.x-i; body[len].y=head.y;*/ len++; } Bend(); if(!kbhit()) head.x++; } void Bend() { int i,j,diff; for(i=bend_no;i>=0&&len<length;i--) { if(bend[i].x==bend[i-1].x) { diff=bend[i].y-bend[i-1].y; if(diff<0) for(j=1;j<=(-diff);j++) { body[len].x=bend[i].x; body[len].y=bend[i].y+j; GotoXY(body[len].x,body[len].y); printf("*"); len++; if(len==length) break; } else if(diff>0) for(j=1;j<=diff;j++) { /*GotoXY(bend[i].x,(bend[i].y-j)); printf("*");*/ body[len].x=bend[i].x; body[len].y=bend[i].y-j; GotoXY(body[len].x,body[len].y); printf("*"); len++; if(len==length) break; } } else if(bend[i].y==bend[i-1].y) { diff=bend[i].x-bend[i-1].x; if(diff<0) for(j=1;j<=(-diff)&&len<length;j++) { /*GotoXY((bend[i].x+j),bend[i].y); printf("*");*/ body[len].x=bend[i].x+j; body[len].y=bend[i].y; GotoXY(body[len].x,body[len].y); printf("*"); len++; if(len==length) break; } else if(diff>0) for(j=1;j<=diff&&len<length;j++) { /*GotoXY((bend[i].x-j),bend[i].y); printf("*");*/ body[len].x=bend[i].x-j; body[len].y=bend[i].y; GotoXY(body[len].x,body[len].y); printf("*"); len++; if(len==length) break; } } } } void Boarder() { system("cls"); int i; GotoXY(food.x,food.y); /*displaying food*/ printf("F"); for(i=10;i<71;i++) { GotoXY(i,10); printf("!"); GotoXY(i,30); printf("!"); } for(i=10;i<31;i++) { GotoXY(10,i); printf("!"); GotoXY(70,i); printf("!"); } } void Print() { //GotoXY(10,12); printf("\tWelcome to the mini Snake game.(press any key to continue)\n"); getch(); system("cls"); printf("\tGame instructions:\n"); printf("\n-> Use arrow keys to move the snake.\n\n-> You will be provided foods at the several coordinates of the screen which you have to eat. Everytime you eat a food the length of the snake will be increased by 1 element and thus the score.\n\n-> Here you are provided with three lives. Your life will decrease as you hit the wall or snake's body.\n\n-> YOu can pause the game in its middle by pressing any key. To continue the paused game press any other key once again\n\n-> If you want to exit press esc. \n"); printf("\n\nPress any key to play game..."); if(getch()==27) exit(0); } void record(){ char plname[20],nplname[20],cha,c; int i,j,px; FILE *info; info=fopen("record.txt","a+"); getch(); system("cls"); printf("Enter your name\n"); scanf("%[^\n]",plname); //************************ for(j=0;plname[j]!='\0';j++){ //to convert the first letter after space to capital nplname[0]=toupper(plname[0]); if(plname[j-1]==' '){ nplname[j]=toupper(plname[j]); nplname[j-1]=plname[j-1];} else nplname[j]=plname[j]; } nplname[j]='\0'; //***************************** //sdfprintf(info,"\t\t\tPlayers List\n"); fprintf(info,"Player Name :%s\n",nplname); //for date and time time_t mytime; mytime = time(NULL); fprintf(info,"Played Date:%s",ctime(&mytime)); //************************** fprintf(info,"Score:%d\n",px=Scoreonly());//call score to display score //fprintf(info,"\nLevel:%d\n",10);//call level to display level for(i=0;i<=50;i++) fprintf(info,"%c",'_'); fprintf(info,"\n"); fclose(info); printf("wanna see past records press 'y'\n"); cha=getch(); system("cls"); if(cha=='y'){ info=fopen("record.txt","r"); do{ putchar(c=getc(info)); }while(c!=EOF);} fclose(info); } int Score() { int score; GotoXY(20,8); score=length-5; printf("SCORE : %d",(length-5)); score=length-5; GotoXY(50,8); printf("Life : %d",life); return score; } int Scoreonly() { int score=Score(); system("cls"); return score; } void Up() { int i; for(i=0;i<=(bend[bend_no].y-head.y)&&len<length;i++) { GotoXY(head.x,head.y+i); { if(len==0) printf("^"); else printf("*"); } body[len].x=head.x; body[len].y=head.y+i; len++; } Bend(); if(!kbhit()) head.y--; }
[ "vishalsethi60@gmail.com" ]
vishalsethi60@gmail.com
3faa5a17691838e0c717898160747fe7255b6664
84960fe6bed34cf2c4473e90693e91f74da26012
/BedLeveling.cpp
4ec04d5a21e657434832cb61056c4b0bef7754e2
[]
no_license
rc-bellergy/micromake-d1-firmware
dd9e0e573546f15239bf14f43464abe71ec896cc
d91b0b0ebd8363eb5b74ffc0e0a17455e0063d62
refs/heads/master
2020-04-17T16:55:37.474024
2019-01-21T07:15:13
2019-01-21T07:15:13
166,762,182
0
0
null
null
null
null
UTF-8
C++
false
false
33,437
cpp
/* More and more printers now have automatic bed leveling using an ever increasing variety of methods. This makes the leveling routine one of the most complex parts of the firmware and there is not one way to level but hundreds of combinations. First you should decide on the correction method. Once we know how our bed is tilted we want to remove that. This correction is defined by BED_CORRECTION_METHOD and allows the following values: BED_CORRECTION_METHOD 0 Use a rotation matrix. This will make z axis go up/down while moving in x/y direction to compensate the tilt. For multiple extruders make sure the height match the tilt of the bed or one will scratch. BED_CORRECTION_METHOD 1 Motorized correction. This method needs a bed that is fixed on 3 points from which 2 have a motor to change the height. The positions are defined by BED_MOTOR_1_X, BED_MOTOR_1_Y, BED_MOTOR_2_X, BED_MOTOR_2_Y, BED_MOTOR_3_X, BED_MOTOR_3_Y Motor 2 and 3 are the one driven by motor driver 0 and 1. These can be extra motors like Felix Pro 1 uses them or a system with 3 z axis where motors can be controlled individually like the Sparkcube does. Next we have to distinguish several methods of z probing sensors. Each have their own advantages and disadvantages. First the z probe has a position when activated and that position is defined by #define Z_PROBE_X_OFFSET 0 #define Z_PROBE_Y_OFFSET 0 This is needed since we need to know where we measure the height when the z probe triggers. When probing is activated you will see a move to make probe go over current extruder position. The position can be changed in eeprom later on. Some probes need to be activated/deactivated so we can use them. This is defined in the scripts #define Z_PROBE_START_SCRIPT "" #define Z_PROBE_FINISHED_SCRIPT "" Now when we probe we want to know the distance of the extruder to the bed. This is defined by #define Z_PROBE_HEIGHT 4 The 4 means that when we trigger the distance of the nozzle tip is 4mm. If your switch tends to return different points you might repeat a measured point and use the average height: #define Z_PROBE_SWITCHING_DISTANCE 1 #define Z_PROBE_REPETITIONS 5 Switching distance is the z raise needed to turn back a signal reliably to off. Inductive sensors need only a bit while mechanical switches may require a bit more. Next thing to consider is the force for switching. Some beds use a cantilever design and pushing on the outside easily bends the bed. If your sensor needs some force to trigger you add the error of bending. For this reason you might add a bending correction. Currently you define #define BENDING_CORRECTION_A 0 #define BENDING_CORRECTION_B 0 #define BENDING_CORRECTION_C 0 which are the deflections at the 3 z probe points. For all other possible measurements these values get interpolated. You can modify the values later on in eeprom. For force less sensors set them to 0. Next thing is endstop handling. Without bed leveling you normally home to minimum position for x,y and z. With bed leveling this is not that easy any more. Since we do bed leveling we already assume the bed is not leveled for x/y moves. So without correction we would hit the bed for different x/y positions at different heights. As a result we have no real minimum position. That makes a z min endstop quite useless. There is an exception to this. If your nozzle triggers z min or if a inductive sensor would trigger at a given position we could use that signal. With nozzle triggers you need to be careful as a drop of filament would change the height. The other problem is that while homing the auto leveling is not used. So the only position would be if the z min sensor is directly over the 0,0 coordinate which is the rotation point if we have matrix based correction. For motor based correction this will work everywhere correctly. So the only useful position for a z endstop is z max position. Apart from not having the bed tilt problem it also allows homing with a full bed so you can continue an aborted print with some gcode tweaking. With z max homing we adjust the error by simply changing the max. z height. One thing you need to remember is setting #define ENDSTOP_Z_BACK_ON_HOME 4 so we release the z max endstop. This is very important if we move xy at z max. Auto leveling might want to increase z and the endstop might prevent it causing wrong position and a head crash if we later go down. The value should be larger then the maximum expected tilt. Now it is time to define how we measure the bed rotation. Here again we have several methods to choose. All methods need at least 3 points to define the bed rotation correctly. The quality we get comes from the selection of the right points and method. BED_LEVELING_METHOD 0 This method measures at the 3 probe points and creates a plane through these points. If you have a really planar bed this gives the optimum result. The 3 points must not be in one line and have a long distance to increase numerical stability. BED_LEVELING_METHOD 1 This measures a grid. Probe point 1 is the origin and points 2 and 3 span a grid. We measure BED_LEVELING_GRID_SIZE points in each direction and compute a regression plane through all points. This gives a good overall plane if you have small bumps measuring inaccuracies. BED_LEVELING_METHOD 2 Bending correcting 4 point measurement. This is for cantilevered beds that have the rotation axis not at the side but inside the bed. Here we can assume no bending on the axis and a symmetric bending to both sides of the axis. So probe points 2 and 3 build the symmetric axis and point 1 is mirrored to 1m across the axis. Using the symmetry we then remove the bending from 1 and use that as plane. By now the leveling process is finished. All errors that remain are measuring errors and bumps on the bed it self. For deltas you can enable distortion correction to follow the bumps. There are 2 ways to consider a changing bed coating, which are defined by Z_PROBE_Z_OFFSET_MODE. Z_PROBE_Z_OFFSET_MODE = 0 means we measure the surface of the bed below any coating. This is e.g. the case with inductive sensors where we put BuildTak on top. In that case we can set Z_PROBE_Z_OFFSET to the thickness of BuildTak to compensate. If we later change the coating, we only change Z_PROBE_Z_OFFSET to new coating thickness. Z_PROBE_Z_OFFSET_MODE = 1 means we measure the surface of the coating, e.g. because we have a mechanical switch. In that case we add Z_PROBE_Z_OFFSET for the measured height to compensate for correct distance to bed surface. In homing to max we reduce z length by Z_PROBE_Z_OFFSET to get a correct height. In homing to z min we assume z endstop is bed level so we move up Z_PROBE_Z_OFFSET after endstop is hit. This requires the extruder to bend the coating thickness without harm! */ #include "Repetier.h" #ifndef BED_LEVELING_METHOD #define BED_LEVELING_METHOD 0 #endif #ifndef BED_CORRECTION_METHOD #define BED_CORRECTION_METHOD 0 #endif #ifndef BED_LEVELING_GRID_SIZE #define BED_LEVELING_GRID_SIZE 5 #endif #ifndef BED_LEVELING_REPETITIONS #define BED_LEVELING_REPETITIONS 1 #endif class PlaneBuilder { float sum_xx, sum_xy, sum_yy, sum_x, sum_y, sum_xz, sum_yz, sum_z, n; public: PlaneBuilder() { reset(); } void reset() { sum_xx = sum_xy = sum_yy = sum_x = sum_y = sum_xz = sum_yz = sum_z = n = 0; } void addPoint(float x, float y, float z) { n++; sum_xx += x * x; sum_xy += x * y; sum_yy += y * y; sum_x += x; sum_y += y; sum_xz += x * z; sum_yz += y * z; sum_z += z; } void createPlane(Plane &plane, bool silent = false) { float det = (sum_x * (sum_xy * sum_y - sum_x * sum_yy) + sum_xx * (n * sum_yy - sum_y * sum_y) + sum_xy * (sum_x * sum_y - n * sum_xy)); plane.a = ((sum_xy * sum_y - sum_x * sum_yy) * sum_z + (sum_x * sum_y - n * sum_xy) * sum_yz + sum_xz * (n * sum_yy - sum_y * sum_y)) / det; plane.b = ((sum_x * sum_xy - sum_xx * sum_y) * sum_z + (n * sum_xx - sum_x * sum_x) * sum_yz + sum_xz * (sum_x * sum_y - n * sum_xy)) / det; plane.c = ((sum_xx * sum_yy - sum_xy * sum_xy) * sum_z + (sum_x * sum_xy - sum_xx * sum_y) * sum_yz + sum_xz * (sum_xy * sum_y - sum_x * sum_yy)) / det; if (!silent) { Com::printF(PSTR("plane: a = "), plane.a, 4); Com::printF(PSTR(" b = "), plane.b, 4); Com::printFLN(PSTR(" c = "), plane.c, 4); } } }; #if FEATURE_AUTOLEVEL && FEATURE_Z_PROBE bool measureAutolevelPlane(Plane &plane) { PlaneBuilder builder; builder.reset(); #if BED_LEVELING_METHOD == 0 // 3 point float h; Printer::moveTo(EEPROM::zProbeX1(), EEPROM::zProbeY1(), IGNORE_COORDINATE, IGNORE_COORDINATE, EEPROM::zProbeXYSpeed()); h = Printer::runZProbe(false, false); if (h == ILLEGAL_Z_PROBE) return false; builder.addPoint(EEPROM::zProbeX1(), EEPROM::zProbeY1(), h); Printer::moveTo(EEPROM::zProbeX2(), EEPROM::zProbeY2(), IGNORE_COORDINATE, IGNORE_COORDINATE, EEPROM::zProbeXYSpeed()); h = Printer::runZProbe(false, false); if (h == ILLEGAL_Z_PROBE) return false; builder.addPoint(EEPROM::zProbeX2(), EEPROM::zProbeY2(), h); Printer::moveTo(EEPROM::zProbeX3(), EEPROM::zProbeY3(), IGNORE_COORDINATE, IGNORE_COORDINATE, EEPROM::zProbeXYSpeed()); h = Printer::runZProbe(false, false); if (h == ILLEGAL_Z_PROBE) return false; builder.addPoint(EEPROM::zProbeX3(), EEPROM::zProbeY3(), h); #elif BED_LEVELING_METHOD == 1 // linear regression float delta = 1.0 / (BED_LEVELING_GRID_SIZE - 1); float ox = EEPROM::zProbeX1(); float oy = EEPROM::zProbeY1(); float ax = delta * (EEPROM::zProbeX2() - EEPROM::zProbeX1()); float ay = delta * (EEPROM::zProbeY2() - EEPROM::zProbeY1()); float bx = delta * (EEPROM::zProbeX3() - EEPROM::zProbeX1()); float by = delta * (EEPROM::zProbeY3() - EEPROM::zProbeY1()); for (int ix = 0; ix < BED_LEVELING_GRID_SIZE; ix++) { for (int iy = 0; iy < BED_LEVELING_GRID_SIZE; iy++) { float px = ox + static_cast<float>(ix) * ax + static_cast<float>(iy) * bx; float py = oy + static_cast<float>(ix) * ay + static_cast<float>(iy) * by; Printer::moveTo(px, py, IGNORE_COORDINATE, IGNORE_COORDINATE, EEPROM::zProbeXYSpeed()); float h = Printer::runZProbe(false, false); if (h == ILLEGAL_Z_PROBE) return false; builder.addPoint(px, py, h); } } #elif BED_LEVELING_METHOD == 2 // 4 point symmetric float h1, h2, h3, h4; float apx = EEPROM::zProbeX1() - EEPROM::zProbeX2(); float apy = EEPROM::zProbeY1() - EEPROM::zProbeY2(); float abx = EEPROM::zProbeX3() - EEPROM::zProbeX2(); float aby = EEPROM::zProbeY3() - EEPROM::zProbeY2(); float ab2 = abx * abx + aby * aby; float abap = apx * abx + apy * aby; float t = abap / ab2; float xx = EEPROM::zProbeX2() + t * abx; float xy = EEPROM::zProbeY2() + t * aby; float x1Mirror = EEPROM::zProbeX1() + 2.0 * (xx - EEPROM::zProbeX1()); float y1Mirror = EEPROM::zProbeY1() + 2.0 * (xy - EEPROM::zProbeY1()); Printer::moveTo(EEPROM::zProbeX1(), EEPROM::zProbeY1(), IGNORE_COORDINATE, IGNORE_COORDINATE, EEPROM::zProbeXYSpeed()); h1 = Printer::runZProbe(false, false); if (h1 == ILLEGAL_Z_PROBE) return false; Printer::moveTo(EEPROM::zProbeX2(), EEPROM::zProbeY2(), IGNORE_COORDINATE, IGNORE_COORDINATE, EEPROM::zProbeXYSpeed()); h2 = Printer::runZProbe(false, false); if (h2 == ILLEGAL_Z_PROBE) return false; Printer::moveTo(EEPROM::zProbeX3(), EEPROM::zProbeY3(), IGNORE_COORDINATE, IGNORE_COORDINATE, EEPROM::zProbeXYSpeed()); h3 = Printer::runZProbe(false, false); if (h3 == ILLEGAL_Z_PROBE) return false; Printer::moveTo(x1Mirror, y1Mirror, IGNORE_COORDINATE, IGNORE_COORDINATE, EEPROM::zProbeXYSpeed()); h4 = Printer::runZProbe(false, false); if (h4 == ILLEGAL_Z_PROBE) return false; t = h2 + (h3 - h2) * t; // theoretical height for crossing point for symmetric axis h1 = t - (h4 - h1) * 0.5; // remove bending part builder.addPoint(EEPROM::zProbeX1(), EEPROM::zProbeY1(), h1); builder.addPoint(EEPROM::zProbeX2(), EEPROM::zProbeY2(), h2); builder.addPoint(EEPROM::zProbeX3(), EEPROM::zProbeY3(), h3); #else #error Unknown bed leveling method #endif builder.createPlane(plane, false); return true; } void correctAutolevel(GCode *code, Plane &plane) { #if BED_CORRECTION_METHOD == 0 // rotation matrix //Printer::buildTransformationMatrix(plane.z(EEPROM::zProbeX1(),EEPROM::zProbeY1()),plane.z(EEPROM::zProbeX2(),EEPROM::zProbeY2()),plane.z(EEPROM::zProbeX3(),EEPROM::zProbeY3())); Printer::buildTransformationMatrix(plane); #elif BED_CORRECTION_METHOD == 1 // motorized correction #if !defined(NUM_MOTOR_DRIVERS) || NUM_MOTOR_DRIVERS < 2 #error You need to define 2 motors for motorized bed correction #endif Commands::waitUntilEndOfAllMoves(); // move steppers might be leveling steppers as well ! float h1 = plane.z(BED_MOTOR_1_X, BED_MOTOR_1_Y); float h2 = plane.z(BED_MOTOR_2_X, BED_MOTOR_2_Y); float h3 = plane.z(BED_MOTOR_3_X, BED_MOTOR_3_Y); // h1 is reference heights, h2 => motor 0, h3 => motor 1 h2 -= h1; h3 -= h1; #if defined(LIMIT_MOTORIZED_CORRECTION) if (h2 < -LIMIT_MOTORIZED_CORRECTION) h2 = -LIMIT_MOTORIZED_CORRECTION; if (h2 > LIMIT_MOTORIZED_CORRECTION) h2 = LIMIT_MOTORIZED_CORRECTION; if (h3 < -LIMIT_MOTORIZED_CORRECTION) h3 = -LIMIT_MOTORIZED_CORRECTION; if (h3 > LIMIT_MOTORIZED_CORRECTION) h3 = LIMIT_MOTORIZED_CORRECTION; #endif MotorDriverInterface *motor2 = getMotorDriver(0); MotorDriverInterface *motor3 = getMotorDriver(1); motor2->setCurrentAs(0); motor3->setCurrentAs(0); motor2->gotoPosition(h2); motor3->gotoPosition(h3); motor2->disable(); motor3->disable(); // now bed is even Printer::currentPositionSteps[Z_AXIS] = h1 * Printer::axisStepsPerMM[Z_AXIS]; #else #error Unknown bed correction method set #endif } /* Implementation of the G32 command G32 S<0..2> - Autolevel print bed. S = 1 measure zLength, S = 2 Measure and store new zLength S = 0 : Do not update length - use this if you have not homed before or you mess up zlength! S = 1 : Measure zLength so homing works S = 2 : Like s = 1 plus store results in EEPROM for next connection. */ bool runBedLeveling(GCode *com) { float h1, h2, h3, hc, oldFeedrate = Printer::feedrate; int s = com->hasS() ? com->S : -1; #if DISTORTION_CORRECTION bool distEnabled = Printer::distortion.isEnabled(); Printer::distortion.disable(false); // if level has changed, distortion is also invalid #endif Printer::setAutolevelActive(false); // iterate Printer::resetTransformationMatrix(true); // in case we switch from matrix to motorized! #if DRIVE_SYSTEM == DELTA // It is not possible to go to the edges at the top, also users try // it often and wonder why the coordinate system is then wrong. // For that reason we ensure a correct behavior by code. Printer::homeAxis(true, true, true); Printer::moveTo(IGNORE_COORDINATE, IGNORE_COORDINATE, EEPROM::zProbeBedDistance() + EEPROM::zProbeHeight(), IGNORE_COORDINATE, Printer::homingFeedrate[Z_AXIS]); #endif Printer::startProbing(true); //GCode::executeFString(Com::tZProbeStartScript); Printer::coordinateOffset[X_AXIS] = Printer::coordinateOffset[Y_AXIS] = Printer::coordinateOffset[Z_AXIS] = 0; Plane plane; #if BED_CORRECTION_METHOD == 1 for (int r = 0; r < BED_LEVELING_REPETITIONS; r++) { #if DRIVE_SYSTEM == DELTA if (r > 0) { Printer::finishProbing(); Printer::homeAxis(true, true, true); Printer::moveTo(IGNORE_COORDINATE, IGNORE_COORDINATE, EEPROM::zProbeBedDistance() + EEPROM::zProbeHeight(), IGNORE_COORDINATE, Printer::homingFeedrate[Z_AXIS]); Printer::startProbing(true); } #endif #endif if (!measureAutolevelPlane(plane)) { Com::printErrorFLN(PSTR("Probing had returned errors - autoleveling canceled.")); return false; } correctAutolevel(com, plane); // Leveling is finished now update own positions and store leveling data if needed float currentZ = plane.z((float)Printer::currentPositionSteps[X_AXIS] * Printer::invAxisStepsPerMM[X_AXIS], (float)Printer::currentPositionSteps[Y_AXIS] * Printer::invAxisStepsPerMM[Y_AXIS]); Com::printF(PSTR("CurrentZ:"), currentZ); Com::printFLN(PSTR(" atZ:"), Printer::currentPosition[Z_AXIS]); // With max z endstop we adjust zlength so after next homing we have also a calibrated printer Printer::zMin = 0; #if MAX_HARDWARE_ENDSTOP_Z float xRot, yRot, zRot; Printer::transformFromPrinter(Printer::currentPosition[X_AXIS], Printer::currentPosition[Y_AXIS], Printer::currentPosition[Z_AXIS], xRot, yRot, zRot); Com::printFLN(PSTR("Z after rotation:"), zRot); // With max z endstop we adjust zlength so after next homing we have also a calibrated printer if (s != 0) { Printer::zLength += currentZ - zRot; Com::printFLN(Com::tZProbePrinterHeight, Printer::zLength); } #endif Printer::currentPositionSteps[Z_AXIS] = currentZ * Printer::axisStepsPerMM[Z_AXIS]; Printer::updateCurrentPosition(true); #if BED_CORRECTION_METHOD == 1 if (fabs(plane.a) < 0.00025 && fabsf(plane.b) < 0.00025 ) break; // we reached achievable precision so we can stop } #endif Printer::updateDerivedParameter(); Printer::finishProbing(); #if BED_CORRECTION_METHOD != 1 Printer::setAutolevelActive(true); // only for software correction or we can spare the comp. time #endif if (s >= 2) { EEPROM::storeDataIntoEEPROM(); } Printer::updateCurrentPosition(true); Commands::printCurrentPosition(PSTR("G32 ")); #if DISTORTION_CORRECTION if (distEnabled) Printer::distortion.enable(false); // if level has changed, distortion is also invalid #endif #if DRIVE_SYSTEM == DELTA Printer::homeAxis(true, true, true); // shifting z makes positioning invalid, need to recalibrate #endif Printer::feedrate = oldFeedrate; return true; } #endif void Printer::setAutolevelActive(bool on) { #if FEATURE_AUTOLEVEL if (on == isAutolevelActive()) return; flag0 = (on ? flag0 | PRINTER_FLAG0_AUTOLEVEL_ACTIVE : flag0 & ~PRINTER_FLAG0_AUTOLEVEL_ACTIVE); if (on) Com::printInfoFLN(Com::tAutolevelEnabled); else Com::printInfoFLN(Com::tAutolevelDisabled); updateCurrentPosition(false); #endif // FEATURE_AUTOLEVEL } #if MAX_HARDWARE_ENDSTOP_Z float Printer::runZMaxProbe() { #if NONLINEAR_SYSTEM long startZ = realDeltaPositionSteps[Z_AXIS] = currentNonlinearPositionSteps[Z_AXIS]; // update real #endif Commands::waitUntilEndOfAllMoves(); long probeDepth = 2 * (Printer::zMaxSteps - Printer::zMinSteps); stepsRemainingAtZHit = -1; setZProbingActive(true); PrintLine::moveRelativeDistanceInSteps(0, 0, probeDepth, 0, EEPROM::zProbeSpeed(), true, true); if (stepsRemainingAtZHit < 0) { Com::printErrorFLN(PSTR("z-max homing failed")); return ILLEGAL_Z_PROBE; } setZProbingActive(false); currentPositionSteps[Z_AXIS] -= stepsRemainingAtZHit; #if NONLINEAR_SYSTEM probeDepth -= (realDeltaPositionSteps[Z_AXIS] - startZ); #else probeDepth -= stepsRemainingAtZHit; #endif float distance = (float)probeDepth * invAxisStepsPerMM[Z_AXIS]; Com::printF(Com::tZProbeMax, distance); Com::printF(Com::tSpaceXColon, realXPosition()); Com::printFLN(Com::tSpaceYColon, realYPosition()); PrintLine::moveRelativeDistanceInSteps(0, 0, -probeDepth, 0, EEPROM::zProbeSpeed(), true, true); return distance; } #endif #if FEATURE_Z_PROBE void Printer::startProbing(bool runScript) { float oldOffX = Printer::offsetX; float oldOffY = Printer::offsetY; float oldOffZ = Printer::offsetZ; if (runScript) GCode::executeFString(Com::tZProbeStartScript); float maxStartHeight = EEPROM::zProbeBedDistance() + (EEPROM::zProbeHeight() > 0 ? EEPROM::zProbeHeight() : 0) + 0.1; if (currentPosition[Z_AXIS] > maxStartHeight) { moveTo(IGNORE_COORDINATE, IGNORE_COORDINATE, maxStartHeight, IGNORE_COORDINATE, homingFeedrate[Z_AXIS]); } Printer::offsetX = -EEPROM::zProbeXOffset(); Printer::offsetY = -EEPROM::zProbeYOffset(); Printer::offsetZ = 0; // we correct this with probe height PrintLine::moveRelativeDistanceInSteps((Printer::offsetX - oldOffX) * Printer::axisStepsPerMM[X_AXIS], (Printer::offsetY - oldOffY) * Printer::axisStepsPerMM[Y_AXIS], 0, 0, EEPROM::zProbeXYSpeed(), true, ALWAYS_CHECK_ENDSTOPS); } void Printer::finishProbing() { float oldOffX = Printer::offsetX; float oldOffY = Printer::offsetY; float oldOffZ = Printer::offsetZ; GCode::executeFString(Com::tZProbeEndScript); if (Extruder::current) { Printer::offsetX = -Extruder::current->xOffset * Printer::invAxisStepsPerMM[X_AXIS]; Printer::offsetY = -Extruder::current->yOffset * Printer::invAxisStepsPerMM[Y_AXIS]; Printer::offsetZ = -Extruder::current->zOffset * Printer::invAxisStepsPerMM[Z_AXIS]; } PrintLine::moveRelativeDistanceInSteps((Printer::offsetX - oldOffX) * Printer::axisStepsPerMM[X_AXIS], (Printer::offsetY - oldOffY) * Printer::axisStepsPerMM[Y_AXIS], (Printer::offsetZ - oldOffZ) * Printer::axisStepsPerMM[Z_AXIS], 0, EEPROM::zProbeXYSpeed(), true, ALWAYS_CHECK_ENDSTOPS); } /* This is the most important function for bed leveling. It does 1. Run probe start script if first = true and runStartScript = true 2. Position zProbe at current position if first = true. If we are more then maxStartHeight away from bed we also go down to that distance. 3. Measure the the steps until probe hits the bed. 4. Undo positioning to z probe and run finish script if last = true. Now we compute the nozzle height as follows: a) Compute average height from repeated measurements b) Add zProbeHeight to correct difference between triggering point and nozzle height above bed c) If Z_PROBE_Z_OFFSET_MODE == 1 we add zProbeZOffset() that is coating thickness if we measure below coating with indictive sensor. d) Add distortion correction. e) Add bending correction Then we return the measured and corrected z distance. */ float Printer::runZProbe(bool first, bool last, uint8_t repeat, bool runStartScript) { float oldOffX = Printer::offsetX; float oldOffY = Printer::offsetY; if (first) { if (runStartScript) GCode::executeFString(Com::tZProbeStartScript); Printer::offsetX = -EEPROM::zProbeXOffset(); Printer::offsetY = -EEPROM::zProbeYOffset(); PrintLine::moveRelativeDistanceInSteps((Printer::offsetX - oldOffX) * Printer::axisStepsPerMM[X_AXIS], (Printer::offsetY - oldOffY) * Printer::axisStepsPerMM[Y_AXIS], 0, 0, EEPROM::zProbeXYSpeed(), true, ALWAYS_CHECK_ENDSTOPS); } Commands::waitUntilEndOfAllMoves(); int32_t sum = 0, probeDepth, shortMove = (int32_t)((float)Z_PROBE_SWITCHING_DISTANCE * axisStepsPerMM[Z_AXIS]); int32_t lastCorrection = currentPositionSteps[Z_AXIS]; #if NONLINEAR_SYSTEM realDeltaPositionSteps[Z_AXIS] = currentNonlinearPositionSteps[Z_AXIS]; // update real #endif int32_t updateZ = 0; for (uint8_t r = 0; r < repeat; r++) { probeDepth = 2 * (Printer::zMaxSteps - Printer::zMinSteps); stepsRemainingAtZHit = -1; int32_t offx = axisStepsPerMM[X_AXIS] * EEPROM::zProbeXOffset(); int32_t offy = axisStepsPerMM[Y_AXIS] * EEPROM::zProbeYOffset(); //PrintLine::moveRelativeDistanceInSteps(-offx,-offy,0,0,EEPROM::zProbeXYSpeed(),true,true); waitForZProbeStart(); setZProbingActive(true); PrintLine::moveRelativeDistanceInSteps(0, 0, -probeDepth, 0, EEPROM::zProbeSpeed(), true, true); if (stepsRemainingAtZHit < 0) { Com::printErrorFLN(Com::tZProbeFailed); return -1; } setZProbingActive(false); #if NONLINEAR_SYSTEM stepsRemainingAtZHit = realDeltaPositionSteps[Z_AXIS] - currentNonlinearPositionSteps[Z_AXIS]; #endif #if DRIVE_SYSTEM == 3 currentNonlinearPositionSteps[X_AXIS] += stepsRemainingAtZHit; currentNonlinearPositionSteps[Y_AXIS] += stepsRemainingAtZHit; currentNonlinearPositionSteps[Z_AXIS] += stepsRemainingAtZHit; #endif currentPositionSteps[Z_AXIS] += stepsRemainingAtZHit; // now current position is correct if (r == 0 && first) // Modify start z position on first probe hit to speed the ZProbe process { int32_t newLastCorrection = currentPositionSteps[Z_AXIS] + (int32_t)((float)EEPROM::zProbeBedDistance() * axisStepsPerMM[Z_AXIS]); if (newLastCorrection < lastCorrection) { updateZ = lastCorrection - newLastCorrection; lastCorrection = newLastCorrection; } } sum += lastCorrection - currentPositionSteps[Z_AXIS]; if (r + 1 < repeat) PrintLine::moveRelativeDistanceInSteps(0, 0, shortMove, 0, EEPROM::zProbeSpeed(), true, false); } float distance = (float)sum * invAxisStepsPerMM[Z_AXIS] / (float)repeat + EEPROM::zProbeHeight(); Com::printF(Com::tZProbe, distance); Com::printF(Com::tSpaceXColon, realXPosition()); Com::printFLN(Com::tSpaceYColon, realYPosition()); // Go back to start position PrintLine::moveRelativeDistanceInSteps(0, 0, lastCorrection - currentPositionSteps[Z_AXIS], 0, EEPROM::zProbeSpeed(), true, false); //PrintLine::moveRelativeDistanceInSteps(offx,offy,0,0,EEPROM::zProbeXYSpeed(),true,true); if (last) { oldOffX = Printer::offsetX; oldOffY = Printer::offsetY; GCode::executeFString(Com::tZProbeEndScript); if (Extruder::current) { Printer::offsetX = -Extruder::current->xOffset * Printer::invAxisStepsPerMM[X_AXIS]; Printer::offsetY = -Extruder::current->yOffset * Printer::invAxisStepsPerMM[Y_AXIS]; } PrintLine::moveRelativeDistanceInSteps((Printer::offsetX - oldOffX)*Printer::axisStepsPerMM[X_AXIS], (Printer::offsetY - oldOffY)*Printer::axisStepsPerMM[Y_AXIS], 0, 0, EEPROM::zProbeXYSpeed(), true, ALWAYS_CHECK_ENDSTOPS); } return distance; } float Printer::bendingCorrectionAt(float x, float y) { PlaneBuilder builder; builder.addPoint(EEPROM::zProbeX1(), EEPROM::zProbeY1(), EEPROM::bendingCorrectionA()); builder.addPoint(EEPROM::zProbeX2(), EEPROM::zProbeY2(), EEPROM::bendingCorrectionB()); builder.addPoint(EEPROM::zProbeX3(), EEPROM::zProbeY3(), EEPROM::bendingCorrectionC()); Plane plane; builder.createPlane(plane, true); return plane.z(x, y); } void Printer::waitForZProbeStart() { #if Z_PROBE_WAIT_BEFORE_TEST Endstops::update(); Endstops::update(); // double test to get right signal. Needed for crosstalk protection. if (Endstops::zProbe()) return; #if UI_DISPLAY_TYPE != NO_DISPLAY uid.setStatusP(Com::tHitZProbe); uid.refreshPage(); #endif #ifdef DEBUG_PRINT debugWaitLoop = 3; #endif while (!Endstops::zProbe()) { defaultLoopActions(); Endstops::update(); Endstops::update(); // double test to get right signal. Needed for crosstalk protection. } #ifdef DEBUG_PRINT debugWaitLoop = 4; #endif HAL::delayMilliseconds(30); while (Endstops::zProbe()) { defaultLoopActions(); Endstops::update(); Endstops::update(); // double test to get right signal. Needed for crosstalk protection. } HAL::delayMilliseconds(30); UI_CLEAR_STATUS; #endif } #endif void Printer::transformToPrinter(float x, float y, float z, float &transX, float &transY, float &transZ) { #if FEATURE_AXISCOMP // Axis compensation: x = x + y * EEPROM::axisCompTanXY() + z * EEPROM::axisCompTanXZ(); y = y + z * EEPROM::axisCompTanYZ(); #endif #if BED_CORRECTION_METHOD != 1 && FEATURE_AUTOLEVEL if (isAutolevelActive()) { transX = x * autolevelTransformation[0] + y * autolevelTransformation[3] + z * autolevelTransformation[6]; transY = x * autolevelTransformation[1] + y * autolevelTransformation[4] + z * autolevelTransformation[7]; transZ = x * autolevelTransformation[2] + y * autolevelTransformation[5] + z * autolevelTransformation[8]; } else { transX = x; transY = y; transZ = z; } #else transX = x; transY = y; transZ = z; #endif } void Printer::transformFromPrinter(float x, float y, float z, float &transX, float &transY, float &transZ) { #if BED_CORRECTION_METHOD != 1 && FEATURE_AUTOLEVEL if (isAutolevelActive()) { transX = x * autolevelTransformation[0] + y * autolevelTransformation[1] + z * autolevelTransformation[2]; transY = x * autolevelTransformation[3] + y * autolevelTransformation[4] + z * autolevelTransformation[5]; transZ = x * autolevelTransformation[6] + y * autolevelTransformation[7] + z * autolevelTransformation[8]; } else { transX = x; transY = y; transZ = z; } #else transX = x; transY = y; transZ = z; #endif #if FEATURE_AXISCOMP // Axis compensation: transY = transY - transZ * EEPROM::axisCompTanYZ(); transX = transX - transY * EEPROM::axisCompTanXY() - transZ * EEPROM::axisCompTanXZ(); #endif } #if FEATURE_AUTOLEVEL void Printer::resetTransformationMatrix(bool silent) { autolevelTransformation[0] = autolevelTransformation[4] = autolevelTransformation[8] = 1; autolevelTransformation[1] = autolevelTransformation[2] = autolevelTransformation[3] = autolevelTransformation[5] = autolevelTransformation[6] = autolevelTransformation[7] = 0; if (!silent) Com::printInfoFLN(Com::tAutolevelReset); } void Printer::buildTransformationMatrix(Plane &plane) { float z0 = plane.z(0, 0); float az = z0 - plane.z(1, 0); // ax = 1, ay = 0 float bz = z0 - plane.z(0, 1); // bx = 0, by = 1 // First z direction autolevelTransformation[6] = -az; autolevelTransformation[7] = -bz; autolevelTransformation[8] = 1; float len = sqrt(az * az + bz * bz + 1); autolevelTransformation[6] /= len; autolevelTransformation[7] /= len; autolevelTransformation[8] /= len; autolevelTransformation[0] = 1; autolevelTransformation[1] = 0; autolevelTransformation[2] = -autolevelTransformation[6] / autolevelTransformation[8]; len = sqrt(autolevelTransformation[0] * autolevelTransformation[0] + autolevelTransformation[1] * autolevelTransformation[1] + autolevelTransformation[2] * autolevelTransformation[2]); autolevelTransformation[0] /= len; autolevelTransformation[1] /= len; autolevelTransformation[2] /= len; // cross(z,x) y,z) autolevelTransformation[3] = autolevelTransformation[7] * autolevelTransformation[2] - autolevelTransformation[8] * autolevelTransformation[1]; autolevelTransformation[4] = autolevelTransformation[8] * autolevelTransformation[0] - autolevelTransformation[6] * autolevelTransformation[2]; autolevelTransformation[5] = autolevelTransformation[6] * autolevelTransformation[1] - autolevelTransformation[7] * autolevelTransformation[0]; len = sqrt(autolevelTransformation[3] * autolevelTransformation[3] + autolevelTransformation[4] * autolevelTransformation[4] + autolevelTransformation[5] * autolevelTransformation[5]); autolevelTransformation[3] /= len; autolevelTransformation[4] /= len; autolevelTransformation[5] /= len; Com::printArrayFLN(Com::tTransformationMatrix, autolevelTransformation, 9, 6); } /* void Printer::buildTransformationMatrix(float h1,float h2,float h3) { float ax = EEPROM::zProbeX2() - EEPROM::zProbeX1(); float ay = EEPROM::zProbeY2() - EEPROM::zProbeY1(); float az = h1 - h2; float bx = EEPROM::zProbeX3() - EEPROM::zProbeX1(); float by = EEPROM::zProbeY3() - EEPROM::zProbeY1(); float bz = h1 - h3; // First z direction autolevelTransformation[6] = ay * bz - az * by; autolevelTransformation[7] = az * bx - ax * bz; autolevelTransformation[8] = ax * by - ay * bx; float len = sqrt(autolevelTransformation[6] * autolevelTransformation[6] + autolevelTransformation[7] * autolevelTransformation[7] + autolevelTransformation[8] * autolevelTransformation[8]); if(autolevelTransformation[8] < 0) len = -len; autolevelTransformation[6] /= len; autolevelTransformation[7] /= len; autolevelTransformation[8] /= len; autolevelTransformation[3] = 0; autolevelTransformation[4] = autolevelTransformation[8]; autolevelTransformation[5] = -autolevelTransformation[7]; // cross(y,z) autolevelTransformation[0] = autolevelTransformation[4] * autolevelTransformation[8] - autolevelTransformation[5] * autolevelTransformation[7]; autolevelTransformation[1] = autolevelTransformation[5] * autolevelTransformation[6];// - autolevelTransformation[3] * autolevelTransformation[8]; autolevelTransformation[2] = autolevelTransformation[3] * autolevelTransformation[7] - autolevelTransformation[4] * autolevelTransformation[6]; len = sqrt(autolevelTransformation[0] * autolevelTransformation[0] + autolevelTransformation[1] * autolevelTransformation[1] + autolevelTransformation[2] * autolevelTransformation[2]); autolevelTransformation[0] /= len; autolevelTransformation[1] /= len; autolevelTransformation[2] /= len; len = sqrt(autolevelTransformation[4] * autolevelTransformation[4] + autolevelTransformation[5] * autolevelTransformation[5]); autolevelTransformation[4] /= len; autolevelTransformation[5] /= len; Com::printArrayFLN(Com::tTransformationMatrix,autolevelTransformation, 9, 6); } */ #endif
[ "rc@bellergy.com" ]
rc@bellergy.com
99dc017155183ce4c367d3ccbe45ba1dd6e46ab0
03db468bb837a4a6a009c778d3f2392261c36884
/ArxProject2/ArxProject2/DrawRecJig.h
21acabf23735b0107d9bf2d5bd1477375b407304
[]
no_license
JieGou/C-AutoCAD
d89592d05b3d5120b57f1f75071b07d7fa2a038e
aa076459aae0c0eab70aee8f55569896fca618e5
refs/heads/master
2023-03-17T02:32:42.584578
2020-05-21T07:17:07
2020-05-21T07:17:07
null
0
0
null
null
null
null
UTF-8
C++
false
false
384
h
#pragma once #include "C:\Autodesk_ObjectARX_2018_Win_64_and_32_Bit\inc\dbjig.h" class DrawRecJig : public AcEdJig { public: DrawRecJig(); ~DrawRecJig(); virtual DragStatus sampler(); virtual bool update(); virtual AcDbEntity* entity() const; bool DoIt(AcGePoint3d &ptCenter,AcDbObjectId &plId); private: AcDbPolyline *pl; AcGePoint3d ptCenter; AcGePoint3d ptCurrent; };
[ "ggbman@hotmail.com" ]
ggbman@hotmail.com
fab41087cfde9d2f8c5c7867ac68bd5e2d4184e1
a80e7dad80bfac6951b179c8610b5d1cfcf54869
/src/miscFunc.cpp
07f816d32cf014132a17f72ced38f73b13683646
[]
no_license
cyberliem/CPPProject
09e6f60b20ddc15be2589e0297afdf6af8209124
ed44f9e1402fad1a87c098fc7160f90bf61a40fb
refs/heads/master
2020-06-13T21:34:04.874204
2016-12-12T07:05:48
2016-12-12T07:05:48
75,551,288
0
0
null
null
null
null
UTF-8
C++
false
false
345
cpp
#include "miscFunc.h" std::string trimStr(std::string totrim){ std::string temp; while (isspace(totrim[0])){ temp=totrim.substr(1,totrim.length()); totrim=temp; } while (isspace(totrim[(totrim.length()-1)])){ temp=totrim.substr(0,totrim.length()-2); totrim=temp; } return(totrim); }
[ "cyberliem.civil@gmail.com" ]
cyberliem.civil@gmail.com
f656ee8d5c9baae896ad098db31910f95355c31d
d3bd59b8e5c880bb2b348978042b809c0d58838c
/TinyRtree.h
8a2a0ef5c184de799feb5d1b2a58076025fa5f9f
[]
no_license
cloudray8580/TinyRtree
461bf0031ae45ce578c36705f0f5c6051951a04d
cec36208bc92bf2e6444df7b054036a903e53a74
refs/heads/master
2023-02-01T03:13:55.629515
2020-12-15T04:07:39
2020-12-15T04:07:39
321,337,489
0
0
null
null
null
null
UTF-8
C++
false
false
11,070
h
/** * Created by Cloud on 2020/9/13. * The TinyRtree is designed to be a simple, efficient and easy to modify prototype of Rtree. * Notice: We keep all the function definition in this .h file as template usage may make * some compiler unable to work with a seperate .cpp file. * ref: https://stackoverflow.com/questions/115703/storing-c-template-function-definitions-in-a-cpp-file */ #ifndef MYRTREE_TINYRTREE_H #define MYRTREE_TINYRTREE_H #define RTREE_TEMPLATEE template<int DIMS, int MaxNodes, int MinNodes, typename IDtype, typename Tk, typename Tv> #define TINYRTREE TinyRtree<DIMS, MaxNodes, MinNodes, IDtype, Tk, Tv> #include <iostream> #include <vector> #include <cmath> #include <cassert> #include <limits> #include <cstdarg> RTREE_TEMPLATEE class TinyRtree { public: TinyRtree(){ std::cout << "create tiny rtree" << std::endl; m_root = Node(); m_root.m_level = 0; }; ~TinyRtree(){ std::cout << "destroy tiny rtree" << std::endl; }; // free the memory struct Rect{ Rect() = default; Rect(std::initializer_list<Tk> list){ // Rect({ L1, L2, U1, U2 }) ; int i = 0; for (Tk elem : list){ i < DIMS ? m_min[i] = elem : m_max[i-DIMS] = elem; i++; } } Tk m_min[DIMS]; Tk m_max[DIMS]; }; struct Node{ Node(): m_level(-1), isLeafNode(false), num_children(0), aggregate_max(0), aggregate_count(0) { children.reserve(MinNodes); auto rect_max = std::numeric_limits<Tk>::max(); auto rect_min = std::numeric_limits<Tk>::lowest(); // min() is for smallest positive value the type can encode std::fill_n(m_rect.m_min, DIMS, rect_max); std::fill_n(m_rect.m_max, DIMS, rect_min); } explicit Node(Rect rect): m_level(-1), isLeafNode(false), num_children(0), aggregate_max(0), aggregate_count(0) { this->m_rect = rect; } Rect m_rect; int m_level; // leaf is 0, root is h, where h is the tree height - 1 double m_volume; int num_children; std::vector<Node> children; bool isLeafNode; bool isLeafElement; Tv aggregate_max; Tv aggregate_count; }; Node m_root; // insert void Insert(Rect rect, IDtype id); bool RecursiveInsert(Rect &rect, IDtype &id, Node &current_node, Node &new_node); void SplitNode(Node &current_node, Node &new_node); // return new node // helper function inline Rect CombineRect(Rect &rect1, Rect &rect2); int ChooseChildIndex(Node &current_node, Rect &rect); inline double RectVolume(Rect rect); // other aggregate support functions // should I write it in a inherited class? }; // = = = = = = = = = = = = = = = Definition = = = = = = = = = = = = = = = RTREE_TEMPLATEE void TINYRTREE::Insert(Rect rect, IDtype id){ Node new_node_next_level; new_node_next_level.m_level = m_root.m_level; bool split = RecursiveInsert(rect, id, m_root, new_node_next_level); if(split){ if(m_root.num_children < MaxNodes){ new_node_next_level.m_level = m_root.m_level - 1; m_root.children.push_back(new_node_next_level); m_root.num_children++; m_root.m_rect = CombineRect(m_root.m_rect, new_node_next_level.m_rect); } else { new_node_next_level.m_level = m_root.m_level; Node new_root; new_root.children.push_back(m_root); new_root.children.push_back(new_node_next_level); new_root.num_children = 2; new_root.m_rect = CombineRect(m_root.m_rect, new_node_next_level.m_rect); new_root.m_level = m_root.m_level + 1; m_root = new_root; // will this have some bugs? } } } RTREE_TEMPLATEE bool TINYRTREE::RecursiveInsert(Rect &rect, IDtype &id, Node &current_node, Node &new_node){ if(current_node.m_level == 0){ // insert here // insert here Node node(rect); node.isLeafElement = true; node.m_level = -1; if(current_node.num_children < MaxNodes){ current_node.children.push_back(node); current_node.num_children++; current_node.m_rect = CombineRect(current_node.m_rect, rect); return false; } else { current_node.children.push_back(node); current_node.num_children++; SplitNode(current_node, new_node); // insert this newNode back to its parent node return true; } } else { // insert in the next level // search for the child node to insert int insert_index = ChooseChildIndex(current_node, rect); Node new_node_next_level; // insert it there bool split = RecursiveInsert(rect, id, current_node.children[insert_index], new_node_next_level); if(split){ // insert new node next level to this node if(current_node.num_children < MaxNodes){ new_node_next_level.m_level = current_node.m_level - 1; current_node.children.push_back(new_node_next_level); current_node.num_children++; current_node.m_rect = CombineRect(current_node.m_rect, new_node_next_level.m_rect); return false; } else { new_node_next_level.m_level = current_node.m_level; current_node.children.push_back(new_node_next_level); current_node.num_children++; SplitNode(current_node, new_node); // insert this newNode back to its parent node return true; } } else { return false; } } } RTREE_TEMPLATEE void TINYRTREE::SplitNode(Node &current_node, Node &new_node){ // initializing volume int index1 = -1, index2 = -1; double max_waste_volume, combined_volume, waste_volume, volume1, volume2; for(int i = 0; i < current_node.children.size(); i++){ current_node.children[i].m_volume = RectVolume(current_node.children[i].m_rect); } // find the two initial nodes for(int i = 0; i < current_node.children.size() - 1; i++){ for(int j = i + 1; j < current_node.children.size(); j++) { combined_volume = RectVolume(CombineRect(current_node.children[i].m_rect, current_node.children[j].m_rect)); volume1 = current_node.children[i].m_volume; volume2 = current_node.children[j].m_volume; waste_volume = combined_volume - volume1 - volume2; if(index1 == -1 && index2 == -1){ max_waste_volume = waste_volume; index1 = i; index2 = j; } else if (waste_volume > max_waste_volume){ max_waste_volume = waste_volume; index1 = i; index2 = j; } } } // buffer the nodes std::vector<Node> node_buffer(current_node.children); // create the initial 2 cluster current_node.children.clear(); current_node.children.push_back(node_buffer[index1]); current_node.m_rect = node_buffer[index1].m_rect; current_node.m_volume = RectVolume(current_node.m_rect); current_node.num_children = 1; new_node.children.clear(); new_node.children.push_back(node_buffer[index2]); new_node.m_rect = node_buffer[index2].m_rect; new_node.m_volume = RectVolume(new_node.m_rect); new_node.num_children = 1; node_buffer.erase(node_buffer.begin() + index2); // index2 is larger than index1 node_buffer.erase(node_buffer.begin() + index1); // now assign the remaining nodes into the 2 cluster double max_volume_diff, volume_diff, volume_increase_1, volume_increase_2; int picked_index, picked_cluster = 0; while(node_buffer.size() > 0){ // find the node that maximize the difference of volume increase picked_index = -1; for(int i = 0; i < node_buffer.size(); i++){ volume_increase_1 = RectVolume(CombineRect(node_buffer[i].m_rect, current_node.m_rect)) - current_node.m_volume; volume_increase_2 = RectVolume(CombineRect(node_buffer[i].m_rect, new_node.m_rect)) - new_node.m_volume; volume_diff = fabs(volume_increase_1 - volume_increase_2); if(picked_index == -1){ max_volume_diff = volume_diff; picked_index = i; picked_cluster = volume_increase_1 < volume_increase_2 ? 0 : 1; } else if (volume_diff > max_volume_diff){ max_volume_diff = volume_diff; picked_index = i; picked_cluster = volume_increase_1 < volume_increase_2 ? 0 : 1; } } // insert the picked node into the corresponding cluster if (picked_cluster == 0){ current_node.children.push_back(node_buffer[picked_index]); current_node.m_rect = CombineRect(node_buffer[picked_index].m_rect, current_node.m_rect); current_node.m_volume = RectVolume(current_node.m_rect); current_node.num_children += 1; } else { new_node.children.push_back(node_buffer[picked_index]); new_node.m_rect = CombineRect(node_buffer[picked_index].m_rect, new_node.m_rect); new_node.m_volume = RectVolume(new_node.m_rect); new_node.num_children += 1; } // delete this node from buffer node_buffer.erase(node_buffer.begin() + picked_index); } } RTREE_TEMPLATEE inline typename TINYRTREE::Rect TINYRTREE::CombineRect(Rect &rect1, Rect &rect2){ Rect combined_rect; for (int dim = 0; dim < DIMS; dim++){ combined_rect.m_min[dim] = std::min(rect1.m_min[dim], rect2.m_min[dim]); combined_rect.m_max[dim] = std::max(rect1.m_max[dim], rect2.m_max[dim]); } return combined_rect; } RTREE_TEMPLATEE int TINYRTREE::ChooseChildIndex(Node &current_node, Rect &rect){ assert(current_node.m_level > 0); Rect enlarged_rect; double original_volume, enlarged_volume, enlargement, min_enlarge_volume; int min_index = -1; for (int i = 0; i < current_node.num_children; i++){ // calculate enlargement for each child enlarged_rect = CombineRect(current_node.children[i].m_rect, rect); original_volume = RectVolume(current_node.children[i].m_rect); enlarged_volume = RectVolume(enlarged_rect); enlargement = enlarged_volume - original_volume; if(min_index == -1){ min_enlarge_volume = enlargement; min_index = i; } else if (enlargement < min_enlarge_volume) { min_enlarge_volume = enlargement; min_index = i; } } return min_index; } RTREE_TEMPLATEE inline double TINYRTREE::RectVolume(Rect rect){ double volume = 1; for (int dim = 0; dim < DIMS; dim++){ volume *= (rect.m_max[dim] - rect.m_min[dim]); } return volume; } #endif //MYRTREE_TINYRTREE_H
[ "240078316@qq.com" ]
240078316@qq.com
4af7fbe96ba575acd04946efb8305a74afd7d5e0
a3c053444c85825e3bae3b1f365d896f36792dd0
/MinecraftSpeedrunHelper/Util/Util.h
16a78a98d14bc004afda7039f00a348d05197e36
[ "MIT" ]
permissive
FFace32/MinecraftSpeedrunHelper
78c36d6627cc25904014dc6e587e3a344f50e2f2
1ebf57fbb2c1f0e48d9f67fc10bbbae1db9a7b69
refs/heads/master
2022-11-30T19:12:17.109392
2020-08-12T16:21:57
2020-08-12T16:21:57
286,347,520
1
0
null
null
null
null
UTF-8
C++
false
false
306
h
#pragma once #include <thread> template <long long Duration, typename Fn> auto SleepFunction( const Fn& Func ) { auto Return = Func(); while ( !Return ) { Return = Func(); std::this_thread::sleep_for( std::chrono::milliseconds( Duration ) ); } return Return; } int Random( int Min, int Max );
[ "unconfigured@null.spigotmc.org" ]
unconfigured@null.spigotmc.org
37a0d44eb636666504c140ecb8fc77132e53a358
a00eba8fd0ffd343546db0dc022052d6a0ffd754
/1.TwoSum.cpp
6215a3fd3241a831edf48739be56dea6bd8ecab8
[]
no_license
gautamgtm/LeetCode
16ed26c7535920694e8f06f642f309eae3fadf1d
56b708a1b265955e071f79cdbcb159ce9ded76b4
refs/heads/master
2020-09-27T14:53:36.997020
2017-04-21T11:00:18
2017-04-21T11:00:18
66,429,235
1
0
null
null
null
null
UTF-8
C++
false
false
2,082
cpp
//1.TwoSum #include <iostream> #include <cstdio> #include <algorithm> #include <cstdlib> #include <vector> #include <string> #include <cstring> #include <set> #include <map> #include <queue> #include <stack> #include <list> #include <cmath> #include <iomanip> #include <time.h> #include <climits> #include <utility> #include <assert.h> using namespace std; #define VI vector <int> #define PII pair <int, int> #define LL long long #define ULL unsigned long long #define LDB long double #define MEM(a,b) memset(a,(b),sizeof(a)) #define FOR(i,a,b) for (auto i = (a); i <= (b); i++) #define FORD(i,a,b) for (auto i = (a); i >= (b); i--) #define FORV(CAKE,it) for(auto it =CAKE.begin(); it != CAKE.end(); it++) #define FIT(it,v) for (auto it = v.begin(); it != v.end(); it++) #define MAX(a,b) ((a) > (b) ? (a) : (b)) #define MIN(a,b) ((a) < (b) ? (a) : (b)) #define ABS(x) ((x < 0)?-(x):x) #define IN(A, B, C) (B) <= (A) && (A) <= (C) #define AIN(A, B, C) assert(IN(A, B, C)) #define MP make_pair #define PB push_back #define FF first #define SS second #define PI 3.14159265358979323846 #define MOD 1000000007 #define INF INT_MAX //Infinity vector<int> twoSum(vector<int>& nums, int target) { vector<int> temp; int sz = nums.size(); int start=0, end=sz-1; vector<pair<int,int> > myVector; for(int i=0; i<sz; i++) { myVector.push_back(make_pair(nums[i],i)); } sort(myVector.begin(), myVector.end()); while(start<end) { if(myVector[start].first + myVector[end].first == target) { temp.push_back(myVector[start].second); temp.push_back(myVector[end].second); break; } else if(myVector[start].first + myVector[end].first > target) end--; else start++; } return temp; } int main() { cin.sync_with_stdio(0); int n; scanf("%d", &n); VI numbers(n); FOR(i,0,n-1) scanf("%d", &numbers[i]); int sum; scanf("%d", &sum); VI ans = twoSum(numbers, sum); FIT(it,ans) printf("%d ", *it); }
[ "noreply@github.com" ]
gautamgtm.noreply@github.com
c60405eb142147ec801d3b5216af41959c75fb41
abb0500e79faa61b31f7fd7a7217c784200aa489
/Tools/GenNameEnuDlg.h
c6894deecc88204427d033f435b0e6cdf62d036d
[]
no_license
15831944/share-strategy
1dbf6f9ff41544434c158a4b29d699404703126a
440896aabc61c5414d0893666e2cdaeb7fcc1460
refs/heads/master
2023-04-01T19:51:29.528327
2017-02-07T02:55:01
2017-02-07T02:55:01
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,362
h
#if !defined(AFX_GENNAMEENUDLG_H__880D48EA_4494_4E36_BAA2_69D986527DC9__INCLUDED_) #define AFX_GENNAMEENUDLG_H__880D48EA_4494_4E36_BAA2_69D986527DC9__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 // GenNameEnuDlg.h : header file // ///////////////////////////////////////////////////////////////////////////// // CGenNameEnuDlg dialog class CGenNameEnuDlg : public CXFDialog { // Construction public: CGenNameEnuDlg(CWnd* pParent = NULL); // standard constructor void StoreProfile( ); void LoadProfile( ); // Dialog Data //{{AFX_DATA(CGenNameEnuDlg) enum { IDD = IDD_GENNAMEENU }; CButton m_btnOK; CString m_strSrcPath; CString m_strDestPath; //}}AFX_DATA // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CGenNameEnuDlg) protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL // Implementation protected: // Generated message map functions //{{AFX_MSG(CGenNameEnuDlg) virtual BOOL OnInitDialog(); afx_msg void OnExplorerSrc(); afx_msg void OnExplorerDest(); virtual void OnOK(); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_GENNAMEENUDLG_H__880D48EA_4494_4E36_BAA2_69D986527DC9__INCLUDED_)
[ "MyRoam" ]
MyRoam
81f6983518212f6b7508d004cd8271ff37844708
f7e5fc39d2052851e82edb19f9abca5d68e91581
/topics/games/monkey-keg/ale/box2d-jump/src/main.cpp
32cb3f5632e9b2647e98107e19bd81bfb9ab7327
[]
no_license
opentechschool-zurich/cpp-co-learning
6a35fa889b66d94648a6abb3c08dec9cb97204f3
c4496866081d6b9b853fbe07146c5f6b88c7a1c2
refs/heads/master
2022-08-08T05:11:18.227097
2022-07-31T19:38:53
2022-07-31T19:38:53
43,436,181
30
12
null
2019-11-03T17:39:00
2015-09-30T13:58:41
C++
UTF-8
C++
false
false
241
cpp
#include <iostream> #include <SFML/Graphics.hpp> #include <SFML/System/Clock.hpp> #include <SFML/System/Time.hpp> #include <Box2D/Box2D.h> #include "game.h" int main() { Box2DJump::Game game; game.init(); game.run(); }
[ "ale@graphicslab.org" ]
ale@graphicslab.org
cdb73d2dc0ebba536cb0176a25157c5cdb6c031b
4bea57e631734f8cb1c230f521fd523a63c1ff23
/projects/openfoam/rarefied-flows/impingment/sims/templates/wedge15Ma5/0.28/uniform/functionObjects/functionObjectProperties
b92f33c61a200e12c3729c3b505e7eb6a63cc11a
[]
no_license
andytorrestb/cfal
76217f77dd43474f6b0a7eb430887e8775b78d7f
730fb66a3070ccb3e0c52c03417e3b09140f3605
refs/heads/master
2023-07-04T01:22:01.990628
2021-08-01T15:36:17
2021-08-01T15:36:17
294,183,829
1
0
null
null
null
null
UTF-8
C++
false
false
898
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v1912 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "0.28/uniform/functionObjects"; object functionObjectProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // ************************************************************************* //
[ "andytorrestb@gmail.com" ]
andytorrestb@gmail.com
1db08c86f3f6f7302c2efc2f558489c730e1b87d
86f4f3464a59f1dd5882712b7646f98ebedb8cf9
/Source/Samples/01_HelloWorld/HelloWorld.cpp
aba88a277c60d0a485b6fe2b7a1054252e2f99b6
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
corefan/AlimerGameEngine
0b89805faa3bf1e9fe4c67bd92126857b64a9d3b
8ba88c7c31f5e15bd6633c595f0d1fce28721905
refs/heads/master
2021-01-01T15:21:24.320337
2017-07-17T17:59:11
2017-07-17T17:59:11
null
0
0
null
null
null
null
UTF-8
C++
false
false
956
cpp
/* ** Alimer - Copyright (C) Amer Koleci ** ** This file is subject to the terms and conditions defined in ** file 'LICENSE.md', which is part of this source code package. */ #include "HelloWorld.h" #include "Engine/Main.h" #include "ShaderCompiler.h" HelloWorld::HelloWorld() : Application() { } HelloWorld::~HelloWorld() { } bool HelloWorld::Setup() { _settings.graphicsDeviceType = GraphicsDeviceType::Direct3D12; //_settings.graphicsDeviceType = GraphicsDeviceType::Vulkan; return true; } void HelloWorld::Initialize() { ShaderCompiler compiler; if (!compiler.Compile(SourceShaderLanguage::GLSL, ShaderStage::Vertex, R"( #version 450 layout(location = 0) in vec4 pos; void main() { gl_Position = pos; })")) { } auto spirv_vertex = compiler.AcquireSpirv(); _engine->GetGraphicsDevice()->CreateShader(ShaderStage::Vertex, spirv_vertex.size(), spirv_vertex.data()); } ALIMER_MAIN(HelloWorld);
[ "amerkoleci@gmail.com" ]
amerkoleci@gmail.com
5e4045e455f9d630535c4bb2373b6d6f3398d071
765dd1a6c46a3a167c59fa6355637df7f8b531eb
/sommet.h
bc1786e31dd3b994260a4ef065850bbab0f04206
[]
no_license
johanlemesle/TD-TP-6
49560d719d8529f90b7d58f8b11826afc08a15b4
3f254da9e38c9c35edb2045ac36262656957225e
refs/heads/master
2020-05-24T20:50:02.789499
2019-05-19T10:26:56
2019-05-19T10:26:56
187,462,352
0
0
null
null
null
null
UTF-8
C++
false
false
690
h
#ifndef SOMMET_H_INCLUDED #define SOMMET_H_INCLUDED #include "coords.h" #include <vector> class Sommet { private : Coords m_position; bool m_selection; public : Sommet(); Sommet(Coords pos, bool sel = false); ~Sommet(); void saisir(); void afficher() const; void selectionner(); double getX() const; double getY() const; bool getSel() const; //void translaterSommet(std::vector<Sommet*>& vec) void translater(Coords translation); //void setPos(Coords position); friend Sommet operator+(const Sommet& a, const Sommet& b); }; #endif // SOMMET_H_INCLUDED
[ "lemesle.johan.pro@gmail.com" ]
lemesle.johan.pro@gmail.com
267ed895437ad2863f0a63c33e0b80186c21aa90
dba6aacfd15bca979a0746df6ecd1d626b704f52
/src/Trigger_SoundTrigger.cpp
3fef0bf0559ad3c6114128818c6e3eea1a2290ee
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
ammeir/hurrican
6554e7e6c3e031949d4fc0bc549c4ed31050e39c
8e4e543d11e466678eeac5d8533e29b530240920
refs/heads/main
2023-03-01T13:23:27.902005
2021-02-15T10:40:41
2021-02-15T10:40:41
336,531,010
7
0
null
null
null
null
UTF-8
C++
false
false
4,788
cpp
// -------------------------------------------------------------------------------------- // Der Sound Trigger // // L�dt Sound mit Namen "Value1.wav" (bei Value1 == 1 z.B. also "1.wav") // Value2 : 0 = Sound st�ndig loopen und Lautstärke vom Spieler abh�ngig regulieren // 1 = Bei SpielerAbstand < 100 Sound einmalig abspielen // 2 = Bei SpielerAbstand < 100 Sound st�ndig abspielen // -------------------------------------------------------------------------------------- #include "stdafx.h" #include "Trigger_SoundTrigger.h" // -------------------------------------------------------------------------------------- // Konstruktor // -------------------------------------------------------------------------------------- GegnerSoundTrigger::GegnerSoundTrigger(int Wert1, int Wert2, bool Light) { Handlung = GEGNER_STEHEN; Value1 = Wert1; Value2 = Wert2; ChangeLight = Light; Destroyable = false; Energy = 100; DontMove = true; Active = true; } // -------------------------------------------------------------------------------------- // "Bewegungs KI" // -------------------------------------------------------------------------------------- void GegnerSoundTrigger::DoKI(void) { switch (Value2) { // Sound loopen, Lautstärke anh�ngig von SpielerAbstand // case 0 : { // Sound auf die richtige Lautstärke und den Pitch setzen // if (PlayerAbstand() < 700) { int vol = 0, pan = 128; float xdiff, ydiff, Abstand; xdiff = ((Player[0].xpos + 45) - xPos); ydiff = ((Player[0].ypos + 45) - yPos); //DKS - Converted to float: Abstand = sqrtf((xdiff * xdiff) + (ydiff * ydiff)); //DKS - Sound is twice as loud here as it should be, and volume is // adjusted against the global sound volume in the sound manager itself: //vol = int(100-float(Abstand/6.0f)) * 2; //vol = int (vol * SoundManager.g_sound_vol /100.0f); vol = int(100-float(Abstand/6.0f)); if (vol < 0) { vol = 0; } else { // Sound links oder rechts vom Spieler ? // if (xPos < Player[0].xpos + 45) { pan = 128 - (100 - vol); if (pan < 0) pan = 0; } else { pan = 128 + (100 - vol); if (pan > 255) pan = 255; } } // Sound abspielen, wenn er noch nicht läuft bzw im Menu gestoppt wurde // //DKS - Added function GetChannelWaveIsPlayingOn() to SoundManagerClass: int channel = SoundManager.GetChannelWaveIsPlayingOn(SOUND_TRIGGER_START + Value1); if (channel == -1 && vol > 0) channel = SoundManager.PlayWave(vol, pan, 11025, SOUND_TRIGGER_START + Value1); //DKS - There are often multiple sound triggers close to one another and they // often interfere with one another. I added a function // SetPendingChannelVolumeAndPanning() that will accept these multiple // requests and create a single result from all of them. //int channel = SoundManager.its_Sounds [SOUND_TRIGGER_START + Value1]->Channel; //SOUND_SetVolume (channel, vol); //SOUND_SetPan (channel, 128); if (channel >= 0) SoundManager.SetPendingChannelVolumeAndPanning(channel, vol, pan); } } break; // Sound einmalig abspielen bei bestimmtem Abstand // case 1 : { if (PlayerAbstand() < 100) { //DKS - added check for WaveIsPlaying: if (!SoundManager.WaveIsPlaying(SOUND_TRIGGER_START + Value1)) SoundManager.PlayWave (100, 128, 11025, SOUND_TRIGGER_START + Value1); Energy = 0.0f; } } break; // Sound immer abspielen bei bestimmtem Abstand // case 2 : { if (PlayerAbstand() < 100) { //DKS - added check for WaveIsPlaying: if (!SoundManager.WaveIsPlaying(SOUND_TRIGGER_START + Value1)) SoundManager.PlayWave (100, 128, 11025, SOUND_TRIGGER_START + Value1); Energy = 0.0f; } } break; } } // -------------------------------------------------------------------------------------- // SoundTrigger explodiert (nicht *g*) // -------------------------------------------------------------------------------------- void GegnerSoundTrigger::GegnerExplode(void) { }
[ "62232971+ammeir@users.noreply.github.com" ]
62232971+ammeir@users.noreply.github.com
32ff41a784a7c3590b4a00be09e7891055941fe8
9987fded6026ace187753eaa3e520d0bb72047a0
/isis/src/qisis/objs/MosaicSceneWidget/MosaicSelectTool.h
ea25514cedbeb06fdb1988ccd807d847134f8fcc
[ "CC0-1.0", "LicenseRef-scancode-public-domain" ]
permissive
kberryUSGS/ISIS3
1345e6727746e2ebc348058ff3ec47c252928604
b6aba8c38db54d84b1eb5807a08d12190bf8634e
refs/heads/dev
2021-07-17T16:53:37.490510
2021-03-13T00:09:53
2021-03-13T00:09:53
118,936,778
0
1
Unlicense
2020-03-31T19:44:30
2018-01-25T16:17:20
C++
UTF-8
C++
false
false
638
h
#ifndef MosaicSelectTool_h #define MosaicSelectTool_h #include "MosaicTool.h" #include <QAction> namespace Isis { /** * @brief Handles selection operations for Isis qt apps * * @ingroup Visualization Tools * * @author ????-??-?? Stacy Alley * * @internal * @history 2011-09-27 Steven Lambright - Improved user documentation */ class MosaicSelectTool : public MosaicTool { Q_OBJECT public: MosaicSelectTool(MosaicSceneWidget *); protected slots: void updateTool(); protected: virtual QAction *getPrimaryAction(); public slots: private: }; }; #endif
[ "slambright@usgs.gov" ]
slambright@usgs.gov
ce30e29bf1be00459cf0a1b4a6004c40ba1029db
aa28a41d90f5f89948f55cb00e09405f768c072a
/problems/inc/problem_45.h
8c8e81603d4c428192ef626518b6ea1f4f2a19fd
[]
no_license
jigjnasu/project_euler
401f5749bb786935fb7256e68a2168ca39e66f5f
75d167639b3ef4fe6c0a6065fd58daeedc408b18
refs/heads/master
2022-11-30T10:12:54.625495
2022-11-27T01:37:26
2022-11-27T01:37:26
55,945,320
0
0
null
null
null
null
UTF-8
C++
false
false
476
h
#ifndef PROJECT_EULER_PROBLEMS_PROBLEM_45_H_ #define PROJECT_EULER_PROBLEMS_PROBLEM_45_H_ namespace project_euler { namespace problems { class Problem_45 { public: Problem_45(); ~Problem_45(); void next_number() const; private: bool m_is_pentagonal(const double& n) const; double m_hexagonal(const double& n) const; }; }; }; #endif // PROJECT_EULER_PROBLEMS_PROBLEM_45_H_
[ "cpp.rakesh@gmail.com" ]
cpp.rakesh@gmail.com
1b4ea8dec96eade10399768c00ee2ea29c4e4194
335ac63a6811b39f12752e99092a5620b0ef8c37
/190423 DX/D2Dll/Pramwork/core/D3D11/ShaderSatge/PixelShader.cpp
a7d1d1e96d10b8a0233a55eb4f80cc2488fab4a2
[]
no_license
siro0413/siro413
cd91e0655b4fe4d585829556c4e75139dda5799e
85d9ad1960c38262df1468eb48df9550d66231ce
refs/heads/master
2020-04-29T09:11:18.462381
2019-05-03T12:36:41
2019-05-03T12:36:41
176,014,978
0
0
null
null
null
null
UTF-8
C++
false
false
1,086
cpp
#include "stdafx.h" #include "PixelShader.h" #include "Pramwork/core/D3D11/D3D11_Helper.h" PixelShader::PixelShader(Context * context) : shader(nullptr) , path("") , entryPoint("") , shaderModel("") { graphics = context->GetSubsystem<Graphics>(); } PixelShader::~PixelShader() { Clear(); } void PixelShader::Create(const std::string & path, const std::string & entryPoint, const std::string & shaderModel, D3D_SHADER_MACRO * defines) { { this->path = path; this->entryPoint = entryPoint; this->shaderModel = shaderModel; ID3DBlob* blob = nullptr; auto result = D3D11_Helper::CompileShader ( path, entryPoint, shaderModel, defines, &blob ); auto hr = graphics->GetDevice()->CreatePixelShader ( blob->GetBufferPointer(), blob->GetBufferSize(), nullptr, &shader ); assert(SUCCEEDED(hr)); SAFE_RELEASE(blob); } } void PixelShader::Clear() { SAFE_RELEASE(shader); } void PixelShader::BindPipeLine() { graphics->GetDeviceContex()->PSSetShader(shader, nullptr, 0); }
[ "noreply@github.com" ]
siro0413.noreply@github.com
04f350a5e184ec6a2518325d38f3b0af2c4fbc8b
e9d1d1b9d9f504d3e5a2300844a82f5ae8fb0b09
/C++/dll.cpp
c31d8443df736922c0370b95ab4ea066b364b62c
[]
no_license
kar10tik/Elementary_DSA
d66865e208417bb6a56c67ecc5c5864a8054a730
084daaaba967324cb8f72a08115458ee4a215f5b
refs/heads/main
2023-07-22T18:14:03.711818
2023-07-07T04:03:29
2023-07-07T04:03:29
236,736,623
0
0
null
null
null
null
UTF-8
C++
false
false
1,921
cpp
//DLL in C++ #include <iostream> #include <bits/stdc++.h> using namespace std; class Node { public: Node *next; Node *prev; int data; }; Node *head = NULL; void insert_node_b(Node **ref, int x) //ref is the head pointer { Node *head = new Node(); head -> data = x; head -> next = *ref; head -> prev = NULL; if ((*ref) != NULL) (*ref)->prev = head; *ref = head; } void insert_node_m(Node *prev_node, int x) { if (prev_node == NULL) { cout<< "The previous node cannot be NULL" << endl; return; } Node* new_node = new Node(); new_node -> data = x; new_node -> next = prev_node -> next; prev_node -> next = new_node; new_node->prev = prev_node; if (new_node -> next != NULL) new_node->next->prev = new_node; } void insert_node_e(Node **ref, int x) { Node* new_node = new Node(); new_node->data = x; new_node->next = NULL; if (*ref == NULL) { new_node->prev = NULL; *ref = new_node; return; } Node* last = *ref; while (last->next != NULL) last = last->next; last->next = new_node; new_node->prev = last; return; } void delete_node_b(Node **ref) //delete the head pointer { *ref -> next -> prev = NULL; } void delete_node_m(int n) { Node *p = head; for (int i = 0; i < n-1; i++) p = p -> next; Node *q = p -> next; p -> next = p -> next -> next; delete q; } void delete_node_e() { ; } void display() { Node *p = head; while (p) { cout << p -> data << " "; p = p -> next; } } int search(Node** ref, int x) { Node* temp = *ref; int pos = 0; while (temp->data != x && temp->next != NULL) { pos++; temp = temp->next; } if (temp->data != x) return -1; return (pos + 1); } int main() { return 0; }
[ "kartik_sahajpal@sindia.co.in" ]
kartik_sahajpal@sindia.co.in
d43591ca04e6793209f8858ad0c03fca309f43de
411f5af436691ef112ca66e28e2e3acd13f5942d
/samples/server/petstore/pistache-server/api/PetApi.cpp
edcdc694951edf6919ac0a93e3b6da6470939c92
[ "Apache-2.0" ]
permissive
swagger-api/swagger-codegen
3e8326c45ba5cb5a73806150b3e1e6fe598e119a
0ba698d52d19e0cb79332bc13f20e02e00cedab7
refs/heads/master
2023-09-03T17:14:24.367082
2023-08-15T14:03:02
2023-08-15T14:03:02
2,006,876
16,415
7,319
Apache-2.0
2023-09-14T14:06:09
2011-07-06T14:26:48
Mustache
UTF-8
C++
false
false
5,789
cpp
/** * Swagger Petstore * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * * OpenAPI spec version: 1.0.0 * Contact: apiteam@swagger.io * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ #include "PetApi.h" namespace io { namespace swagger { namespace server { namespace api { using namespace io::swagger::server::model; PetApi::PetApi(Pistache::Address addr) : httpEndpoint(std::make_shared<Pistache::Http::Endpoint>(addr)) { }; void PetApi::init(size_t thr = 2) { auto opts = Pistache::Http::Endpoint::options() .threads(thr) .flags(Pistache::Tcp::Options::InstallSignalHandler); httpEndpoint->init(opts); setupRoutes(); } void PetApi::start() { httpEndpoint->setHandler(router.handler()); httpEndpoint->serve(); } void PetApi::shutdown() { httpEndpoint->shutdown(); } void PetApi::setupRoutes() { using namespace Pistache::Rest; Routes::Post(router, base + "/pet", Routes::bind(&PetApi::add_pet_handler, this)); Routes::Delete(router, base + "/pet/:petId", Routes::bind(&PetApi::delete_pet_handler, this)); Routes::Get(router, base + "/pet/findByStatus", Routes::bind(&PetApi::find_pets_by_status_handler, this)); Routes::Get(router, base + "/pet/findByTags", Routes::bind(&PetApi::find_pets_by_tags_handler, this)); Routes::Get(router, base + "/pet/:petId", Routes::bind(&PetApi::get_pet_by_id_handler, this)); Routes::Put(router, base + "/pet", Routes::bind(&PetApi::update_pet_handler, this)); Routes::Post(router, base + "/pet/:petId", Routes::bind(&PetApi::update_pet_with_form_handler, this)); Routes::Post(router, base + "/pet/:petId/uploadImage", Routes::bind(&PetApi::upload_file_handler, this)); // Default handler, called when a route is not found router.addCustomHandler(Routes::bind(&PetApi::pet_api_default_handler, this)); } void PetApi::add_pet_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { // Getting the body param Pet body; try { nlohmann::json request_body = nlohmann::json::parse(request.body()); body.fromJson(request_body); this->add_pet(body, response); } catch (std::runtime_error & e) { //send a 400 error response.send(Pistache::Http::Code::Bad_Request, e.what()); return; } } void PetApi::delete_pet_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { // Getting the path params auto petId = request.param(":petId").as<int64_t>(); // Getting the header params auto apiKey = request.headers().tryGetRaw("api_key"); try { this->delete_pet(petId, apiKey, response); } catch (std::runtime_error & e) { //send a 400 error response.send(Pistache::Http::Code::Bad_Request, e.what()); return; } } void PetApi::find_pets_by_status_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { // Getting the query params auto status = request.query().get("status"); try { this->find_pets_by_status(status, response); } catch (std::runtime_error & e) { //send a 400 error response.send(Pistache::Http::Code::Bad_Request, e.what()); return; } } void PetApi::find_pets_by_tags_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { // Getting the query params auto tags = request.query().get("tags"); try { this->find_pets_by_tags(tags, response); } catch (std::runtime_error & e) { //send a 400 error response.send(Pistache::Http::Code::Bad_Request, e.what()); return; } } void PetApi::get_pet_by_id_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { // Getting the path params auto petId = request.param(":petId").as<int64_t>(); try { this->get_pet_by_id(petId, response); } catch (std::runtime_error & e) { //send a 400 error response.send(Pistache::Http::Code::Bad_Request, e.what()); return; } } void PetApi::update_pet_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { // Getting the body param Pet body; try { nlohmann::json request_body = nlohmann::json::parse(request.body()); body.fromJson(request_body); this->update_pet(body, response); } catch (std::runtime_error & e) { //send a 400 error response.send(Pistache::Http::Code::Bad_Request, e.what()); return; } } void PetApi::update_pet_with_form_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { try { this->update_pet_with_form(request, response); } catch (std::runtime_error & e) { //send a 400 error response.send(Pistache::Http::Code::Bad_Request, e.what()); return; } } void PetApi::upload_file_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { try { this->upload_file(request, response); } catch (std::runtime_error & e) { //send a 400 error response.send(Pistache::Http::Code::Bad_Request, e.what()); return; } } void PetApi::pet_api_default_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { response.send(Pistache::Http::Code::Not_Found, "The requested method does not exist"); } } } } }
[ "wing328hk@gmail.com" ]
wing328hk@gmail.com
e5d12dd6a883d4ce5e3db47e7580bb14aedf265a
2e46ef9411a8e84074d35338240a69f65b7a6a5d
/include/tdp/inertial/imu_outstream.h
27f9b746c46c858b3e10c082c747ce41e4b639b9
[ "MIT-feh" ]
permissive
zebrajack/tdp
c0deff77120e20f0daf32add31cbcebe480fb37d
dcab53662be5b88db1538cf831707b07ab96e387
refs/heads/master
2021-07-08T12:10:09.626146
2017-09-11T19:25:42
2017-09-11T19:25:42
null
0
0
null
null
null
null
UTF-8
C++
false
false
880
h
#pragma once #include <string> #include <tdp/inertial/imu_obs.h> #include <pangolin/utils/picojson.h> #include <pangolin/utils/uri.h> #include <pangolin/log/packetstream.h> namespace tdp { class ImuOutStream { public: ImuOutStream(const std::string& path, size_t buffer_size_bytes = 1000); ~ImuOutStream(); bool IsOpen() const; void Open(const std::string& uri, const pangolin::json::value& properties); void Close(); bool IsPipe() { return is_pipe; } int WriteStream(const ImuObs& data, const pangolin::json::value& frame_properties = pangolin::json::value()); private: std::string input_uri; const std::string filename; pangolin::json::value device_properties; pangolin::PacketStreamWriter packetstream; size_t packetstream_buffer_size_bytes; int packetstreamsrcid; bool first_frame; size_t total_frame_size; bool is_pipe; }; }
[ "jstraub@csail.mit.edu" ]
jstraub@csail.mit.edu
e8788922346a33d2000e21136b6e36de667025fd
d8c2a2308e068ea8786660513dbd190dc8abed30
/src/HTTP/HttpResponse.h
205c46030c01cab4ae59c7c23a9b8f6068a6200f
[ "MIT" ]
permissive
ABILATA/evo3
ef2bae7d31576b09a510ab485d9342452212f7df
3ffee5bc3231e52c3338bd06dccf05982c39e828
refs/heads/master
2020-03-19T03:01:56.610296
2018-06-05T07:08:42
2018-06-05T07:08:42
135,687,345
0
0
null
null
null
null
UTF-8
C++
false
false
1,402
h
// Copyright (c) 2011-2017 The Cryptonote developers // Copyright (c) 2014-2017 XDN developers // Copyright (c) 2016-2017 BXC developers // Copyright (c) 2017 Royalties developers // Copyright (c) 2018 [ ] developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #pragma once #include <ostream> #include <string> #include <map> namespace CryptoNote { class HttpResponse { public: enum HTTP_STATUS { STATUS_200, STATUS_401, STATUS_404, STATUS_500 }; HttpResponse(); void setStatus(HTTP_STATUS s); void addHeader(const std::string& name, const std::string& value); void setBody(const std::string& b); const std::map<std::string, std::string>& getHeaders() const { return headers; } HTTP_STATUS getStatus() const { return status; } const std::string& getBody() const { return body; } private: friend std::ostream& operator<<(std::ostream& os, const HttpResponse& resp); std::ostream& printHttpResponse(std::ostream& os) const; HTTP_STATUS status; std::map<std::string, std::string> headers; std::string body; }; inline std::ostream& operator<<(std::ostream& os, const HttpResponse& resp) { return resp.printHttpResponse(os); } } //namespace CryptoNote
[ "joaocatani@gmail.com" ]
joaocatani@gmail.com